Why do the trash folder of Nexus never empties?

2019-06-16 06:23发布

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 ?

2条回答
叼着烟拽天下
2楼-- · 2019-06-16 06:33

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.

查看更多
Deceive 欺骗
3楼-- · 2019-06-16 06:39

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.

查看更多
登录 后发表回答