Lifecycle_Test has 3 environments: Test (mandatory), UAT (optional), Staging (optional) Lifecycle_Prod has 1 environment: Production (mandatory)
Every lifecycles has the following retention policy
Releases: Keep 5 releases. Files on Tentacle: Keep 5 releases.
In Channel_Test I deploy releases often in Test environment only.
In some cases the retention policies works fine (most of time in Channel_Prod with only one mandatory environment) otherwise octopus keeps infinite releases (and also infinite packages).
It could be possible Octopus couldn’t delete releases (and packages) whose do not have all environments (also marked as optional) deployed?
Apologies for any confusion, the “Apply retention policies” task I was referring to is a stand-alone task. You can find these under Tasks -> Show Advanced Filters -> select “Apply retention policies” in “By task type”. If you wouldn’t mind sending a recent raw task log of one of these tasks, this should give me most (if not all) of the information I’ll need to see what is going on.
I have reviewed the logs and don’t see anything too out of the ordinary. There are a few instances of older releases remaining on the dashboard such as these:
16:28:01 Info | *Line 47* - Release 3.11.11 is the previous release for a release on the dashboard, so it will be kept to allow rollback
16:28:01 Info | *Line 257* - Release 20.12.21-beta.1752 is the previous release for a release on the dashboard, so it will be kept to allow rollback
16:28:02 Info | *Line 300* - Release 20.12.21-beta.1755 is on the dashboard, so it will be kept
Releases that appear on the dashboard will cause the retention policies to count back from that release, even if it is effectively “old”.
Perhaps, are you finding the packages on-disk in the built-in feed are not getting deleted as expected?