Deleting artifacts older than 2 years from local nexus repository

Viewed 17333

We're running nexus on some old hardware which is limited in disk space and would like to remove artifacts older than a certain threshold.

Is there any way to do this other than a combination of find and curl?

5 Answers

auto purge older than 30 days(u can change it) not download docker images from nexus 3

https://gist.github.com/anjia0532/4a7fee95fd28d17f67412f48695bb6de

# nexus3's username and pwd
username = 'admin'
password = 'admin123'

# nexus host
nexusHost = 'http://localhost:8081'

# purge repo
repoName = 'docker'

# older than days
days = 30

#change and run it
Related