Retention Issue on 1st Phase in lifecycle

Good Day

I am having a problem with retention settings not being applied correctly to a specific phase.

We are on Octopus Deploy

My lifecycle setup is as follow:

Phase 1 Test
Phase 2 Production

Default retention policy = Keep 5 Releases, Keep 5 Files on Tentacles

Phase 1 policy = Keep 3 Releases, Keep 3 Files on Tentacles
Phase 2 policy = Keep 3 Releases, Keep 3 Files on Tentacles

Our tentacles are configured as Listening Tentacles & our Deploy NuGet steps as : “Octopus Server will download the package, then securely upload it to the Tentacles.” (This is due to deployment over VPN Connections)

When deploying to Phase 1 and checking the DeploymentJournal, the variables are as follow:
RetentionPolicyDaysToKeep=“0” RetentionPolicyItemsToKeep=“5”

When Deploying to Phase 2 the DeploymentJournal variables look as follow:
RetentionPolicyDaysToKeep=“0” RetentionPolicyItemsToKeep=“3”

It seems like the overriding of the Retention Policy in the 1st Phase in a lifecycle doesn’t seem to apply correctly.
I noticed this since our default retention policy was on “Keep All” but I managed to figure out the workaround by changing the default which then luckily applies to the 1st phase.

Please let me know if you require any more information.

Kind Regards

Deon Fouché

Hi Deon,

Thanks for reaching out. Between and the latest 2.6 build ( we fixed a couple of bugs around retention policies that might be related to your situation. Would it be possible for you to upgrade to



Thank you so much for your prompt response Dalmiro.

I spoke to my colleagues and we are due for a release in 2 weeks so they are a bit nervous to do an upgrade on Octodeploy at this stage but we will confirm this tomorrow.

I will return with an answer whether this has been sorted as soon as we have upgraded.

Once again thank you for your response.


Deon Fouché

Hi Deon - No problem! Let me know how it goes after the upgrade.

Good Day Dalmiro

We have now upgraded to Octopus Deploy and unfortunately the problem still persist.

I have deleted the DeploymentJournal & did a reset on the Retention Policy on my 1st phase and re-applied the Items to keep = 3 with override policy and created a new release of our product but once again the result in the newly created DeploymentJournal is as follow: RetentionPolicyItemsToKeep=“5”

Any Advise?

See pictures attached.


Hi Deon,

I was able to reproduce this in 2.6. I’m gonna bring it up to the team and give you an update about this first thing on monday.



Hi Deon,

We’ll need to investigate this!

I’ve reopened an issue in GitHub related to this issue so you can see our progress:


Thank you Dalmiro

Hi Deon,

I’ve submitted a new Issue in github to have this fixed. You can follow its progress here

Please keep in mind that we will be fixing this issue for Octopus 3.0 only. We wont be making changes to 2.6, so the only way to get the fix will be to upgrade to 3.0