How do the retention policies currently work on Linux tentacles? I know that the tar.gz package is uploaded to the home folder, and also extracted there. Will retention policies have any effect on cleaning up space there?
Also, do retention policies apply across channels? In other words, if I perform a deployment of the same project over two channels, and my retention policy is set to save only the latest package on the tentacle, will both remain?
Finally, is there a way to tell the retention policy not to keep ANY latest versions on the tentacle? Our packages are extremely large, and we find ourselves running out of space on the /home partition after just a few channels have been deployed.
Thanks for getting in touch! Both Tentacle and SSH targets use the same command for cleaning up during the Apply retention policy phase of a deployment, and they use something like Calamari.exe clean --retentionPolicySet "Environments-2/projects-161/Step-Package B/machines-65/<default>" and either the --days or --releases arguments.
In answer to your last question, you can’t configure Octopus to “not keep ANY versions” since the cleanup process deletes both the source and destination folders which would undo all your hard work. What you want to achieve is different to what most customers expect from Octopus.
In your scenario I would suggest adding an [AfterPostDeploy.sh](http://docs.octopusdeploy.com/display/OD/Package+deployment+feature+ordering) script using the [Octopus.Tentacle.CurrentDeployment.PackageFilePath](http://docs.octopusdeploy.com/display/OD/System+variables) variable to delete the massive package. I haven’t tried this in anger myself, but it should give you a good starting place.