Clearing Nuget Package Cache

What is the best way to trim down the Package Cache in the Octopus data folder?
Is there a retention type policy? Currently we are creating a deploy on check-in to TeamCity so the cache can grow quite big. Also the Nuget packages are already stored as artifacts on the TeamCity server so don’t necessarily need them on both.

Hi Eli,

We automatically delete files from the cache once they are more than 20 days old. Is that too long for you?


Is it safe to manually delete them if we want a lower retention than that?

Hi Paul,

Thanks for your prompt response.
20 days is good. the main thing is that it is automatically trimming. That being said it would be good if I reduce the days as the Nuget Packages are in Teamcity so I don’t really need them.

Now I need to now find out how TeamCity handles old artifacts and how I can automatically trim that.

Thanks again,


Yes, it is. If a file doesn’t exist in the cache we’ll re-download it.


We’ll consider adding a setting (or lowering the default value). Thanks for the feedback.