September 12, 2012

Deleting Releases via the Command Line

One of the items on our backlog is the ability to set a retention policy for projects, which automatically cleans up old deployed applications, cached NuGet packages, and releases/deployments from the Octopus UI.

This item isn't done yet, but in the mean time, if you need to delete releases/deployments, you can now do it using the latest version of Octo.exe along with an Octopus server running version 1.0.31 or higher.

From the command line, the syntax is:

octo delete-releases --project=MyProject --minversion=1.0.0 --maxversion=2.0.0 --apikey=ABCDEF... --server=http://<your-octopus>

The version numbers are inclusive, and can be partially specified - e.g., 2.0.0 or 2.0.1982.12981. SemVer rules are used when comparing the version numbers.

As I said, this isn't enough to be a full retention policy feature, but it might useful if, for example, you accidentally created a few hundred releases because of a circular dependency in your build/deploy scripts :)

Walkthrough Integration

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.