How do I delete old release builds?

How do I delete old release builds?

AuthorFullName__c
JFrog Support
articleNumber
000001229
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:35:27Z
lastModifiedDate
2024-03-10T07:48:27Z
VersionNumber
5

There are two methods to delete old release builds:
 

Deleting the artifacts already deployed to Artifactory:

You could delete old builds by 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, 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.