Introduction
Since 7.53.5, Artifactory supports the Prune Unreferenced Data storage maintenance operation for providers using Azure, GCP, and S3 storage.
You can click the button on the page: Administration -> Artifactory Settings -> Maintenance -> Prune Unreferenced Data.
Prune Unreferenced Data supports s3 storage on Artifactory 7.71.23, but does not work expectantly on Artifactory > 7.72.
The steps for reproducing the problem:
- Start Artifactory > 7.72 with S3 storage, such as: 7.125.9
- Upload binaries to the S3 bucket directly, such as:
S3://<bucket>/filestore/7a/7aff2b5dde95aa81e74838d6ab33ae5c3c768e7d
- Click the “Prune Unreferenced Data” button
- Check the logs in artifactory-service.log
2025-12-29T07:35:04.895Z [jfrt ] [INFO ] [96eb033ea7eec5c013425f4302cb00a7] [o.j.s.b.c.FilestorePruner:186 ] [2cb00a7|art-exec-302] - No files were pruned from dir 7a
The 7aff2b5dde95aa81e74838d6ab33ae5c3c768e7d binary was not cleaned up as expected.
Root Cause
The issue above arises because the cleanup process (the GUI button) does not include the binaries (on S3 bucket) from the past 24 hours, which cannot be modified in GUI now.
Resolution
There is a Rest API named Start PUD Process that can handle this situation:
And the parameter is binaryOlderThanDays, which is
- Optional. If present, unreferenced binaries that are newer than binaryOlderThanDays are ignored by the PUD process. If binaryOlderThanDays = 0, the PUD process does not relate to the binary creation date.
- Default: 1 (ignore unreferenced binaries created in the last 24 hours)
Sample Usage:
As the same scenario above, at this time, a real pruning is performed (dryRun is not present), and all unreferenced binaries are deleted.
curl -u admin:password -XPOST http://artifactory_host:port/artifactory/api/system/storage/prune/start
-H "Content-Type: application/json" \
-d '{
"binaryOlderThanDays":"0"
}'
You will see the deleted information details in the artifactory-service.log
2026-01-29T03:41:53.332Z [jfrt ] [INFO ] [0612c715ab94cb779fedae71a6ba767e] [o.j.s.b.c.FilestorePruner:122 ] [6ba767e|art-exec-132] - Prune process will be resumed from directory following 00
…
2026-01-29T03:41:54.548Z [jfrt ] [INFO ] [0612c715ab94cb779fedae71a6ba767e] [o.j.s.b.c.FilestorePruner:188 ] [6ba767e|art-exec-132] - 762730 bytes in 1 files were pruned from dir 7a
…
2026-01-29T03:41:55.119Z [jfrt ] [INFO ] [0612c715ab94cb779fedae71a6ba767e] [o.j.s.b.c.FilestorePruner:216 ] [6ba767e|art-exec-132] - Prune task has completed with report: Started at 26-01-29T-03:41:53.331+0000, finished at 26-01-29T-03:41:55.116+0000 (took 00:00:01.785) with status FINISHED. 3 processed, 3 cleaned, 772442 bytes cleaned