Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do the trash folder of Nexus never empties?

Tags:

linux

maven

nexus

For my maven enterprise repository, I use Sonatype Nexus, deployed as a Tomcat6 webapp.

I've configured default snapshots cleanup task. Unfortunatly, each week (or each pair of week, don't know exactly), that machine reaches 100% disk occupation, and I have to go in the /usr/share/tocmat6/sonatype-work/nexus/storage/snapshots/.nexus/trash folder to perform a rm -rf.

This is incredibly stupid ! And I'm quite sure it's my own stupid. So, what can I do to have the trash empty task really clean up that folder ?

like image 344
Riduidel Avatar asked Oct 19 '12 14:10

Riduidel


2 Answers

You need to configure a task to clean the trash

  • Go to nexus
  • log in as an administrator
  • Go to Adminitration -> Scheduled tasks
  • Add a task of type Empty trash

These instructions should work on nexus 1.8 and above. They might work on previous versions, but I don't have any installed.

like image 85
Augusto Avatar answered Nov 03 '22 13:11

Augusto


Turns out default configuration of "Empty trash" is to delete items older than 180 days ! This is clearly not suitable for a continuous integration server ! I changed that value to 5 days.

like image 20
Riduidel Avatar answered Nov 03 '22 14:11

Riduidel