Some util Groovy scripts which can be used as task in Nexus 3.
Create a new execute script task and use one of these scripts
Compute size for each component in all repositories (Mo)
By default these script only print components informations that can be deleted.
In script : uncomment this line to really delete components
//tx.deleteComponent(component);
Filter component with these parameters
final REPOSITORY_NAME = 'your repo'
final GROUP = 'com.organization'
final NAMES = ['package1','package2']
This script delete all component except them which version begin with VERSION constant
final REPOSITORY_NAME = 'your repo';
final VERSION = 'unique version keep';
final GROUP = 'com.organization'
final NAMES = ['package1','package2','package3']
Delete only components matching these filters
final REPOSITORY_NAME = 'REPOSITORY_NAME';
final VERSION = ['V1','V2','V3'];
final GROUP = 'com.organization'
final NAMES = ['package1','package2','package3']