nexus-public icon indicating copy to clipboard operation
nexus-public copied to clipboard

The issue of blob deletion in Docker repositories

Open JaynLau opened this issue 9 months ago • 3 comments

When deleting a Docker asset in the Browse UI, Nexus does not delete the related blobs, even if they are not referenced by any other assets. In a more extreme case, after deleting all assets from a Docker repository via the Browse UI, and then running the "Cleanup unused docker blobs from Nexus", "Docker - Delete unused manifests and images", and "Admin - Compact blob store" tasks, the blobs still remain undeleted. This repository is associated with a private blob store.

My Nexus version is 3.78.2.

Image

JaynLau avatar Mar 25 '25 10:03 JaynLau

Related to #468?

wolkenschieber avatar Apr 19 '25 09:04 wolkenschieber

Yes, Nexus has been this way ever since I started using it. I find that I have to build a new instance periodically, and discard the old instance with all its data. Storage eventually fills up no matter how much space you have, and there's no way to clear stale blobs besides trashing the entire backend storage.

#468 is the most recent duplicate report but the problem goes way back.

instantlinux avatar May 04 '25 04:05 instantlinux

Nexus Version: 3.68.1-02 (OrientDB)

I successfully freed storage space by deleting a specific Docker repository. Here's the verified workflow:

1. Delete the target repository

This initiates the cleanup process.

2. Automatic soft-delete (background scheduled task)

  • Runs automatically every 10 minutes 'Storage facet cleanup' task
  • Performs soft-deletion of blobs if there are deleted repos (marks them as deleted but doesn't reclaim space)
  • Time scales with data: For a ~40TB repository (2M blobs), this took ~18 hours
  • Completion signal: Look for this log entry:
    Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change RUNNING → WAITING (OK)
    

3. Manual hard-delete (CRITICAL for space recovery)

After soft-delete completes:

  • Run the Compact blob store task
  • ❗Without this step, disk space isn't reclaimed

gexium avatar Jul 02 '25 09:07 gexium