# Cleanup deleted repositories

**URL:** <https://community.sonatype.com/t/cleanup-deleted-repositories/6552>\
**Category:** Sonatype Nexus Repository\
**Created:** [May 18, 2021, 1:37pm UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552 "2021-05-18T13:37:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhonny.oliveira](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jhonny.oliveira/32/1844_2.png) [@jhonny.oliveira](https://community.sonatype.com/u/jhonny.oliveira)\
**Post date:** [May 18, 2021, 1:37pm UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/1 "2021-05-18T13:37:34Z")

</div>

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:

 ![Screenshot 2021-05-19 122228](https://canada1.discourse-cdn.com/flex047/uploads/communitysonatype/original/2X/a/a561318c522dfc88a12071007f87c4950a884aaa.png)

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

---

<div class="post-metadata">

**Author:** ![este.nombre.esta.disponible](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@este.nombre.esta.disponible](https://community.sonatype.com/u/este.nombre.esta.disponible)\
**Post date:** [May 21, 2021, 6:58am UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/2 "2021-05-21T06:58:47Z")

</div>

Hi,

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

Kind regards.

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [May 21, 2021, 2:59pm UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/3 "2021-05-21T14:59:53Z")

</div>

Generally speaking there is a task that runs periodically in the background - [nexus-public/StorageFacetCleanupTaskManager.java at master · sonatype/nexus-public · GitHub](https://github.com/sonatype/nexus-public/blob/master/components/nexus-repository/src/main/java/org/sonatype/nexus/repository/storage/internal/StorageFacetCleanupTaskManager.java)

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.

---

<div class="post-metadata">

**Author:** ![jhonny.oliveira](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jhonny.oliveira/32/1844_2.png) [@jhonny.oliveira](https://community.sonatype.com/u/jhonny.oliveira)\
**Post date:** [May 21, 2021, 3:35pm UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/4 "2021-05-21T15:35:58Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [May 28, 2021, 2:03pm UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/5 "2021-05-28T14:03:53Z")

</div>

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.

> **[What Happened To issues.sonatype.org?](https://central.sonatype.org/faq/what-happened-to-issues-sonatype-org/)**

---

<div class="post-metadata">

**Author:** ![jhonny.oliveira](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jhonny.oliveira/32/1844_2.png) [@jhonny.oliveira](https://community.sonatype.com/u/jhonny.oliveira)\
**Post date:** [May 28, 2021, 2:24pm UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/6 "2021-05-28T14:24:05Z")

</div>

Looking forward for the upgrade.  
Thank you!

---

<div class="post-metadata">

**Author:** ![pogacnik](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@pogacnik](https://community.sonatype.com/u/pogacnik)\
**Post date:** [October 21, 2024, 10:38am UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/7 "2024-10-21T10:38:47Z")

</div>

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)?

 ![image](https://canada1.discourse-cdn.com/flex047/uploads/communitysonatype/original/2X/b/bc88c3cfcf0d4bd6590a67efb197be7120aed93f.png)

---

<div class="post-metadata">

**Author:** ![sebastien\_picavet](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sebastien\_picavet](https://community.sonatype.com/u/sebastien_picavet)\
**Post date:** [November 26, 2024, 3:31pm UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/8 "2024-11-26T15:31:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pogacnik](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@pogacnik](https://community.sonatype.com/u/pogacnik)\
**Post date:** [November 28, 2024, 7:09am UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/9 "2024-11-28T07:09:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sebastien\_picavet](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sebastien\_picavet](https://community.sonatype.com/u/sebastien_picavet)\
**Post date:** [November 28, 2024, 9:04am UTC](https://community.sonatype.com/t/cleanup-deleted-repositories/6552/10 "2024-11-28T09:04:45Z")

</div>

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).
