Jenkins : Remove all disabled modules in Maven jobs

To remove all disabled modules in Maven jobs

Jenkins.instance.getAllItems(hudson.maven.MavenModuleSet.class).findAll{job -> job.isBuildable()}.each{
job ->
  job.getDisabledModules(true).each{module -> module.delete()} 
  println(job.name+" cleaned")
}