When nexus decides to delete blobs, and which blobs, if nothing configured to do so


We’re using Sonatype Nexus Repository ManagerOSS 3.30.1-01 with an s3 blobstore and 3 npm repos (hosted, proxy and group) configured with this blobstore,
I see a lot of objects in s3 bucket with a tag deleted=true, but we have no any Cleanup policy or Tasks,
and for “proxy” repo “Maximum component age” is -1,
so my question is -
when nexus decides to delete blobs, and which blobs, if nothing configured to do so ?


Hi Alexey. Nexus Repository will never decide to delete a blob on its own. To remove blobs of components that were soft deleted (no longer present in any repository, but blobs still present on disk) you have to run an Admin - Compact blob store task.

Thank you very much, Dawid, for you answer.
maybe “Invalidate cache” action for “proxy” repos could be a
trigger for soft delete?

No. Invalidate cache will make Nexus Repository to check for any changes to already stored content at remote repository next time a client will request them. Without doing that, once Nexus Repository has downloaded some content, it will not check for changes on remote repository until its cache expires. You can control the values for that in your repository settings. You can learn more about storage management from our guide: A Primer for Storage Management in Nexus Repository 3 - Sonatype Guides

When files in repositories are updated with newer vesrsions it will cause the old versions of these to be deleted. For instance, when a maven-metadata.xml file is uploaded during artifact deploy the old one will be deleted. This will give you blobs in deleted state.

1 Like

Thank you, Rich, for the answer,
I’m just truing to understand from where it comes.
I have “Disable redeploy” on the hosted repo and -1 “Maximum component age” on the proxy repos (save cache forever), on the remote repos versions are almost always immutable (http://registry.npmjs.org/), and I have no any “Cleanup Policy” configured…