So it turns out that if you have 0 packages in your built-in repository and a non-zero days retention policy, the Retention Policy Task will fail with the following message:
Hi Fer,
Thanks for reaching out. We have a fix for this and it’ll be released in 3.2.3: https://github.com/OctopusDeploy/Issues/issues/2142
Cheers,
Dalmiro