How do I delete old release builds?

There are two methods to delete old release builds:

Deleting the artifacts already deployed to Artifactory:

You could delete old builds by their build number from the UI at artifacts tab → tree browser, right click on a repository’s name, or browse deeper to the folder from which you want to delete recursively, and choose ‘delete versions’, this will open a menu with all relevant build versions to delete. Then, you can just mark the ones you want to delete. 


You could also delete builds by version from the REST API with the ‘Delete build’ query.


Handling future builds:

In order to utilize a mechanism that deletes older releases as the ‘max unique snapshots’ does for snapshot versions, you could write your own ‘user plugin’ to intercept artifacts deployments to Artifactory with the ‘afterCreate’ hook, and check if the deployment artifacts are from the relevant build (check build.name and build.number properties), and run the cleanup accordingly.