I have existing Jenkins (2.90) jobs that are taking up disk space. When I enable the "Discard Old Builds" option I don't see any cleanup going on in the folder on the builds older than 7 days.

When does Jenkins do this cleanup? Or does it only apply for new builds after I apply the setting?

Jenkins discard build option


Per the Jenkins documentation:

Cleanup per project/job is performed after that job runs.

As of v2.221, cleanup will also periodically run using the new Global Build Discarders (even if a job has not recently been run).


  • Thank you for the reply - I can confirm it cleans up after the job is run.
    – Avner
    Apr 16 '20 at 22:26
  • 1
    Any idea what "periodically" means for the global build discarders though?
    – GJP
    Nov 3 '20 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.