ARTIFACTORY: How do I remove old build-information?

AuthorFullName__c
Yonatan Hen
articleNumber
000005756
FirstPublishedDate
2023-05-31T18:37:01Z
lastModifiedDate
2025-07-20

ARTIFACTORY: How do I remove old build-information?

There are three ways to safely remove unnecessary build information:
 

1. Using REST API.
2. Using JFrog CLI.
3. Using the Build Cleanup User Plugin.
 
  • The Build Cleanup user plugin can be used to delete builds older than a given number of days. It can be manually executed using the REST API or according to a hard coded cron expression (defaults to every 10 seconds). Read more about User Plugins in Artifactory on the User Plugins documentation.
  • We recommend first dry-running the build Cleanup user plugin (using the default configuration of the buildCleanup.properties file) and paying close attention to the detected delete candidates on the artifactory.log (accessible via the Admin tab in the Artifactory UI under “Advanced” ? System logs (the plugin will print all the delete candidates on the artifactory.log). 
  • It's necessary to change the “dryRun” property from “true” to “false” in the buildCleanup.properties file for the plugin to actually delete builds when using the Build Cleanup User Plugin. The days parameter is also specified in this file with the default value of 3 days. Both the Delete Builds REST API and the Build Cleanup user plugin do not delete build related artifacts.
  • Using the REST API, the whole process can of course be automated using a client-side script that iterates over a range of build numbers in order to delete a group of builds. 
  • If cleanup has not been done for some time, any of the methods mentioned above may be time consuming, depending on the number and the size of builds; however if "pruning" of old build-information is performed on a regular basis, the time required should not be problematic.