Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View Discard Old Build on the plugin site for more information.

Developed by

This plugin provides a post-build step where you can discard old build results in detailed configuration (ex. keep only builds with specified status).


  • You can configure how to discard builds in more detail than the default 'Discard Old Build' function.
    • Other than # of builds and days, you can specify build status to discard/keep.
    • For older builds, you can configure interval to keep builds (once in a month, once in ten builds...).
    • You can also use logfile size to decide if delete a old build.



After installing this plugin, a new post-build step named 'Discard Old Builds' appears.

'Days to keep builds' and 'Max # of builds to keep' work as same as Jenkins core function.
With checking statuses in 'Status to keep' section, Jenkins will keep the builds with selected statuses.

  • Last build / last stable build / last successful build are always kept.
  • If all the checkboxes are left unchecked, builds with any status are kept.


In advanced section, you can configure how to treat the builds which are older than the criteria specified in basic configuration.
For old builds, perhaps you don't want to keep all, but sometimes you want to keep some of them with less frequency.


This configuration shows:

  • Latest 10 builds are kept.
  • Except for the latest 10, one in 15 builds are kept(#1, #16, #31,...).


This configuration shows:

  • Builds within 30 days are kept.
  • For builds older than 30 days, only builds with unstable/failure are kept.


  • Add help text
  • Add dynamic adjust discard order of discard conditions


1.05 (released June 27, 2013)

  • Add reg expression checker to discard build
  • Readjust the UI and code logic

1.04 (released June 6, 2013)

  • Add logfile size checker to discard build

1.03 (released April 12, 2013)

1.0 (released January 27, 2013)

  • Initial release.


  1. Unknown User (dekon)

    I am using version 1.05, and I get a different looking build step. How can I get the config options you show above. Thanks.

  2. Unknown User (rsaddey)

    Does the plugin respect the Keep this build forever setting on individual builds?

    Looking at the source, I cannot find any clue, plugin just calls Run.delete(). I'm not a Jenkins programmer, so I' can't tell...

  3. Unknown User (esinsag)

    This wiki page has misleading information since version 1.05 has a different UI than shown here.

    Please update ASAP.

  4. BE CAREFUL!!!

    This plugin does not seem to do what the UI says.
    I lost 4GB of test data because the algorithm seems to follow the old UI and did not what I was expecting!

  5. Unknown User (jl.pinardon)

    (thumbs down) Does not work at all for me.
    I configured a job to keep 10 builds and 1 based on a interval set to 5.
    It finally keeps only 2 builds... In fact, it always keep only 2 builds.
    This has been tested on an OSS 1.588 instance as well as with a 14.05 Enterprise instance.

    It is a pity because the features are interesting.

  6. Unknown User (cygoonda)

    Wish I had read the comments before I too, lost a bunch of data. UI and documentation don't match. Difficult to understand what the plugin is trying to do and what it actually did. Uninstalling now.

  7. Unknown User (madsbrix)

    This plugin is buggy in several ways.

    I gave up on it, and is trying out the default discard combined with Build Keeper Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Build+Keeper+Plugin.

    Seems to be working fine.