Introduction
Found that the Artifactory does not clean all expected unused artifacts in remote-repo-cache repositories in one go after running “Cleanup Unused Cached Artifacts”.
https://jfrog.com/help/r/jfrog-artifactory-documentation/cache-settings-for-remote-repositories
https://jfrog.com/help/r/jfrog-platform-administration-documentation/regular-maintenance-operations
Root Cause
Each cleaning job has quantity limit of artifacts, as the messages shown in the following logs of cleaning job:
2025-11-11T07:41:49.362Z [jfrt ] [INFO ] [fca4288e15ba100f27ba62df114a5cad] [ArtifactCleanupServiceImpl:350] [114a5cad|art-exec-11] - Auto-clean iteration on the repository 'gene-remote-cache' has ended. 10000
artifact(s) were cleaned
2025-11-11T07:41:49.426Z [jfrt ] [INFO ] [fca4288e15ba100f27ba62df114a5cad] [ArtifactCleanupServiceImpl:350] [114a5cad|art-exec-11] - Auto-clean iteration on the repository 'gene-remote-cache' has ended. 10000
artifact(s) were cleaned
2025-11-11T07:41:49.476Z [jfrt ] [INFO ] [fca4288e15ba100f27ba62df114a5cad] [ArtifactCleanupServiceImpl:350] [114a5cad|art-exec-11] - Auto-clean iteration on the repository 'gene-remote-cache' has ended. 10000
artifact(s) were cleaned
2025-11-11T07:41:49.477Z [jfrt ] [INFO ] [fca4288e15ba100f27ba62df114a5cad] [ArtifactCleanupServiceImpl:241] [114a5cad|art-exec-11] - Current execution of Auto-clean on all repositories has ended. 30000
artifact(s) were cleaned
Thus, the unused artifacts won’t be all cleaned in one go if the quantity of artifacts in the repositories that need to be cleaned is larger than the default limit in each clean job.
Resolution
By updating the following parameters in the artifactory.system.properties file, the Artifactory would more artifacts each time:
artifactory.artifacts.cleanup.job.bulk.size=10000
artifactory.artifacts.cleanup.job.duration.millis=300000
artifactory.artifacts.cleanup.job.max.items=200000
After updating the values in the artifactory.system.properties file, the artifactory needs to be restarted to make the updates effective.