Jenkins supports deleting old builds for a project by days or maxium number of builds to keeps. This is useful to keep disk usage under control. Here are steps to setting up auto delete old beuild in Jenkins project.
- Open Jenkins project and click on configure to open configuration screen for the project.
-
Locate the discard old builds checkbox.
- Select discard old builds checkbox to see more options. Type number of days to 10 or any other desired value. Alternatively you can also choose maximum numbers of builds to keep. Click save once done.