Artifactory Cleanup Methods + How do I delete old artifacts?

 

Artifactory has many cleanup methods; unfortunately, it does not have an old artifact cleanup process out of the box, but this can be easily implemented with a user plugin. Also, please read Advanced Cleanup Using Artifactory Query Language (AQL) for advanced clean up method.

 

  • You can use our artifactCleanup.groovy user plugin available in our public GitHub repository.
    • This plugin can be executed manually with cURL or scheduled with a cron expression to cleanup artifacts not downloaded in a set period of time.
  • You can clean up a remote repository by modifying the field "Keep unused Artifacts (Hours)" that is located under Admin tab -> Configuration -> Repositories -> Edit the remote repository -> Advanced.

 

All of Artifactory's cleanup methods are described in this document.