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.
- When this field is configured, then “Cleanup Unused Cached Artifacts“ will run and remove the artifacts that match the criteria.
All of Artifactory’s cleanup methods are described in this document.