Duplicate nupkg files in both bin and octopacked directories

We are using VSTS and our own build server to generate the package, however, as our site portfolio has increased the disk space has been consumed by the nupkg files. This build server is an Azure VM so the initial disk is 126GB.
I need to configure octopus so that the nupkg files are removed from the bin folder following a successful build and only the file in the octopaked directory is retained. Otherwise periodically we are going to have to remove the nupgk files.

Hi Andrew,

Octopack doesn’t have any setting to do this internally. Our normal recommendation for a build server environment is that you completely clear the bin folder before each build, regardless of if you are using Octopus or not. This helps ensure that your builds are independent and repeatable, and not accidentally dependent on previous state. Some build servers have an option for this built in, or you could add an MSBuild build task to do it.

If you want to just clear the nupkg, again I’d recommend a build task you call before each build on your build server that just deletes *.nupkg from the bin folder.

Regards,
Mark