We have an Artifactory server that is using 220Gb - with the libs-snapshots-local
repository utilising 98% of that storage.
When we looked at the configuration for the repository we noted that Maven snapshot behaviour was set to: unique
and that the Max Unique Snapshots value was 0
.
We changed the Max Unique Snapshots value to 5.
This seems to work when we are still working on the Snapshot, however if we no longer deploy to the snapshot (a release has been made) then it doesn't delete any of these files.
As an example: we have the following in the Snapshots repository:
com/company/some/app/1.23-SNAPSHOT/.. (50+ artifacts)
com/company/some/app/1.24-SNAPSHOT/.. (5 artifacts)
Artifactory keeps the current SNAPSHOT directory ( 1.24-SNAPSHOT
) at a max of 5 artifacts, however the number of artifacts in the 1.23-SNAPSHOT
directory never decreases.
It seems that Artifactory uses the deployment of an artifact to trigger the cleanup check - Thus if you're no longer deploying to that artifact, then no clean up will be done?
How do we get Artifactory to start deleting the surplus artifacts in the 1.23-SNAPSHOT
folder?