How Can I Configure Nexus 3 to Reduce Disk Space

Using Scheduled Tasks to Manage Space

Nexus Repository Manager 3 includes some scheduled tasks to help manage space. These tasks include:

Purge unused components and assets
Purge unused Maven snapshot versions
Remove snapshots from Maven repository
Purge incomplete docker uploads
Purge unused docker manifests and images

Many of these tasks mark content for deletion from a blob store. To physically delete the content from the storage device you need to run:

Compact blob store

These tasks are all described in the documentation

Remove snapshots from Maven repository

This task provides flexibility in specifying both the snapshot retention days as well as the minimum snapshot count per GAV for a maven repository.

As a guide, the following is a set of conservative settings:

Repositories: All Repositories
Snapshot retention (days): 30
Minimum snapshot count: 3
Remove if released: yes
Grace period after release (days): 7

If disk space is still an issue after using the values above you can adjust the settings to delete snapshots more aggressively depending on your requirements.

Using Tasks or Scripts to Examine Blobstore Space Usage

If you would like more insight into how blobstore space is being consumed to make better informed configuration decisions you can run groovy scripts either from the command line or from within a Nexus task. This article provides samples to get you started.

Out of Space?

If you are currently out of disk space there are a couple of other articles you can look at to free up space urgently and get the system up and running:

What to Do When the Database is Out of Disk Space

What to Do When the Blobstore is Out of Disk Space



Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk