Sonatype Introduces Next Generation Dependency Management | Press Release

blog-logo Sonatype Blog

Keeping Your Nexus Repositories Clean Just Got Easier

October 25, 2018 By Jeremy Bryan

We are excited to announce that Nexus Repository Manager 3.14.0 introduces cleanup. Cleanup is a new feature making it easier than ever to clean up your repositories, by separating what to delete from when it gets deleted. It is now possible to share cleanup policies across repositories and clean up formats you never could before. And yes, you can even clean up disk-consuming formats like Docker!

In the world of computing, all things (seemingly) continue to move, expand or change at an alarming rate. The rate at which software teams deliver software is no different. As teams adopt CI/CD and make use of container technologies like Docker and Vagrant, they are able to build and deliver software faster. Increased delivery speed is great in many respects, but is often accompanied by more builds, more versions of components, and ultimately wasted resources.

One of the challenges facing many teams is how to manage all these artifacts once created. Questions like “Is anyone even using this version anymore?” and “When was this version last updated?” are far too common. Unfortunately, the answers to these questions often include responses like “I don’t know, for now, we’ll just request more disk space”. The cycle repeats. Over time, unused or unneeded components unnecessarily consume storage space and bloat repositories.

While it is true Nexus Repository Manager already provides some tasks to help with these types of challenges, they are format specific and often passively applied. What if repository administrators could proactively groom their repositories to drop the cruft, the old, the unused and the unwanted components? What if there was a way to continually keep your repositories tidy?

The cleanup feature allows you to do just that. Cleanup has two pieces: cleanup policies (shown below) and the cleanup task. Cleanup policies define the criteria that control which components get cleaned up. The cleanup task controls when cleanup is performed. The strategy for this feature was to use a concept familiar to Nexus Repositories users (tasks) and introduce user-configurable criteria to drive actual cleanup behavior. You define the policies and you decide the frequency and can define cleanup policies that are format specific or format generic (apply to repositories of all formats).

clean up blog 1
“That’s great but it sounds like you could accidentally delete something you intended to keep. What if I want to see what will actually be deleted before I turn the task loose on my repositories?”, you might ask. Well, we included a ‘preview’ (shown below) which lets you see a subset of the components that would be removed without actually removing them. You can think of it as a ‘dry run’ and an easy way to verify your cleanup policy is set up correctly.

clean up blog 2

“Ok, ok, that’s cool, but it sounds like you’re saying I don’t need all those tasks I’ve already spent time creating and configuring?” We designed the cleanup feature to be complementary to existing scheduled tasks so you can continue to use any existing tasks you have configured.

Everything you need to know to get started can be found in the Nexus Repository Manager 3 help documentation. We strongly encourage you to take a look at the documentation as you get started. We provide way more detail along with some helpful tips.

While we are excited about this feature, we are not done yet. What we have released in 3.14.0 is based on initial user feedback and is just the start. We have more cleanup features planned to make this capability even more useful. If you have feedback or suggestions we would love to hear about them so please connect with us by email at nexus-feedback@sonatype.com or online at my.sonatype.com.

Tags: Docker, Nexus Repository, Nexus Repository 3, clean up policies, Product

Written by Jeremy Bryan