Retention policies on Tentacle is not work, and there is lot of nupkg files on target servers

Hi, I noticed my old release never be remove by Retention policy. which suppose only keep 3 (default)
and I check my e:\Octopus\Files folder, all the nupkg files on the servers.

could you tell me in which condition it will work?




Thanks for getting in touch! Retention policies should work without any special conditions.

The retention policy for a tentacle is run at the end of a successful deployment, but only runs for the project that was just deployed. At the end of your deployment log you should see something like this:

                    |   == Success: Apply retention policy on Tentacles ==
14:57:54   Info     |     Apply retention policies...
14:57:56   Verbose  |     Apply Tentacle Retention Policy completed
                    |     Success: DWebApp01
                    |       Success: Applying retention policy using 3 Items to set Environments-1/Projects-21/Step-Deploy jQuery/Machines-1/<default>
14:57:55   Verbose  |         Octopus Deploy: Calamari version 3.3.12+Branch.master.Sha.5c60c9a9a96c3991cf8f8f3c1f28fe131d8648a4
14:57:56   Verbose  |         Removing directory 'C:\OctopusDev\master\Applications\DWebApp01\Development\jQuery\2.2.5_5'
14:57:56   Verbose  |         Removing package file 'C:\OctopusDev\master\Tentacle\DWebApp01\Files\jQuery.2.2.5.nupkg-56b1ff7d-06cc-42e5-a72f-0611a83f1a66'
14:57:56   Verbose  |         Removing directory 'C:\OctopusDev\master\Applications\DWebApp01\Development\jQuery\2.2.5_4'

Do you see anything about Applying retention policy on Tentacles in your logs? If you could attach your deployment log to this discussion it will help to debug this issue. You can follow the guide here to get your raw deployment log. If the log has sensitive information you can edit it before attaching, or you can make this discussion private using the MAKE PRIVATE button on the right of the forum.

If you would prefer to look into things more yourself there is additional information on debugging retention issues here.

Hope that helps!