Delete Jenkins Build History

Categories: Blog

If you want to delete the whole history build because of reasons (I do this whenever I was building a job and now is ready for prime time!) you will have to go to: http://your-server/script and then run the following:

item = Jenkins.instance.getItemByFullName("YOUR JOB NAME!")
item.builds.each() { build ->
build.delete()
}
item.updateNextBuildNumber(1)
«
»