Why does removing/deleting old artifacts is not affecting the Artifactory disk space usage?

Noy Badani
2021-09-23 08:10

Subject

Why does removing/deleting old artifacts is not affecting the Artifactory disk space usage?

Cause

The Binaries size is greater than Artifacts size, this means the GC didn’t run.

Resolution

To verify the current status of the Artifacts and Binaries size, you may navigate in the Platform UI, to the Administration module → Monitoring → Storage (in case you are using Artifactory 7.x and above).
As shown in the below screenshot: 

User-added image

Alternatively, if you are using Artifactory 6.x and below, in Artifactory UI, you may navigate to the Admin module. → Advanced → Storage.  
As shown in the below screenshot:

User-added image

The above behavior caused by the new Garbage Collector feature introduced in Artifactory version 6.12, as stated in our Garbage Collection documentation:
“Unreferenced binaries, (including existing unreferenced binaries or artifacts that were manually deleted from the trashcan), will be deleted during the previous Full GC strategy that runs every 20 GC iterations”.
This means that by default, after deleting an artifact from the UI / using REST API, the actual binaries will be removed from the filestore after 20 runs of the Garbage Collector (12 hours) or alternatively you should wait for 20/(24/4) = 3.33 days if the GC runs every 4 hours (default). This only takes place if the artifacts are unreferenced, meaning that they are not used by any other repository.

Following the above and in order to overcome the increase in disk usage, you should execute the Garbage Collection REST API call 20 times.