Considering the Purge option on the custom installation directory feature. If your packet has a directory and several sub directories, What happens if the purge option is set to true.
Our main concern is the sub directories will be deleted and permissions will be lost.
Thanks for getting in touch! The Purge option will completely delete everything including sub directories.
You could use your own Powershell pre-deploy script to purge the files required.
Here is the order a package step is run:http://docs.octopusdeploy.com/display/OD/Package+deployment+feature+ordering
There is also a library step that deletes files, but running this outside of the package step could add extra problems.
Hope that helps!