Cleanup deleted repositories

Hi!

As par of our housekeeping activities, I have recently removed several repositories from Nexus (maven proxy). However, I have noticed that they are still around and consuming space. From the query I ran, I can see that the repos have been marked for deletion:

I already ran “Compact blob store”, unfortunately, it does not seem to make any difference.

Is there a way to clean-up this space?

Thank you!
Jhonny

1 Like

Hi,

I’m having the very same issue. Is there any way to remove repositories that are marked as “pending deletion”?

Kind regards.

Generally speaking there is a task that runs periodically in the background - nexus-public/StorageFacetCleanupTaskManager.java at master · sonatype/nexus-public · GitHub

If its not running the quartz trigger is probably broken. You could (while nexus is stopped) connect to the database and remove that task which Nexus will re-create on startup.

Thank you @mpiggott for the information provided so far!

Can you please be a little bit more specific on the steps required to solve the issue? Can’t we do it via the WebUI?

Cheers!

I had some time and made a change to remove and recreate the task on startup which should be in 3.31 which I believe will fix the issue.

2 Likes

Looking forward for the upgrade.
Thank you!

I have same problem, after removing proxy repo, data was not removed.
Will any of this tasks clean some disk (I don’t want to reboot nexus)?

Compact blob task are needed to claim the free space. First task must be done.

When you create “compact blob store” you have to set the repository, but what if you delete the entire repository, which task should I run to delete data from deleted repository?

Repository != blob
Deleting repository is not deleting the blob store.
If you have also deleted the blob store, files are staying in NEXUS_DIR/sonatype-work/nexus3/blobs. I have never tested, but in that case, I think you can also delete the directory (just rename it to be sure at the first time).

1 Like