Thanks for getting in touch! There is nothing you can set in Octopus that will clean up the current or previous deployment. You can add a script in the deployment process, we have variables you can use if you are interested in this.
The packages being retained allow for the use of delta compression transfers which overall means less network traffic.
Have you considered using the extraction directory instead of the custom installation directory to keep the duplication slightly less?
How exactly do the delta compression transfers work then? I see a directory on the tentacle for Config/Files which contains all the version files which I could understand are used for upload and delta transfers.
To me it seems like the extraction directory is solely used for extraction, config changes and such before moving to the custom install directory?
Unfortunately using the extraction directory is not an option for us due to our ACL setup and it would also still mean a minimum of 2 extracted versions per tenant.
Maybe it could be an idea for the future to allow the cleanup of these files when using a custom installation directory?
Delta compression works on the package cache to determine if there are any previously uploaded packages to determine if a delta can be made.
It is not in any way effected by the extract directory. While I can absolutely understand you need to have a custom installation directory, extracting a package over this would lead to major issues.
We always extract to a new directory - even if the version of the release exists on the server - because we need a fresh un-accessed location. When files are extracted it is assumed they will be in an incomplete state. That variables need to be substituted, and configuration transforms need to occur. It gives the ability for the extracted files to be completed and ready for access. Extracting over an existing directory could have incomplete or unready files accessed by a live website or service, which is not wanted. We perform all of these tasks and then either re-point IIS to this new directory or in your case move the files to the location you specify. The former considered the best practice in Continuous Delivery. In essence we keep a current deployment and a previous as state instead of backup purposes.
We do see that for Tenants this would lead to a bit of extra duplication depending on the amount of Tenants you have - the extraction directory is the working directory when you use CID. If we deleted them you would also never have a previous - and like I said you are welcome to write a post script that does delete this directory. You are also welcome to add this as a suggestion to our UserVoice site to see how much community support is behind the idea of having no extraction directories when a CID is used, we are always encouraged by votes for extending features. https://octopusdeploy.uservoice.com/