Choose which builds are selected to be kept
See the documentation on the wiki for more information.

Keep based on build number
This policy will look at the build number and will decide whether to keep only on the build number and whether Dont keep failed is checked.
As this policy is not based on historical information, you can use a discard policy that only keeps a low (say 30) builds, but Keep every can be set to 100, and every 100 builds will be kept e.g. 1, 101, 201.
The build number sequence is not affected if a build that would have been kept, was not kept because it was not good enough and Dont keep failed is selected.
In the example above, if Dont keep failed is selected and build 101 failed, then the next build to keep will still be 201, regardless of how many successful builds there were in between.
Keep since last kept
This policy will look backwards through the builds to find out whether a build has keep forever set within the Keep every range, and if not, then this build will be kept.
This means that if a build has been kept for any other reason, eg manually selected, or via a promotion, then the period will reset and unnecessary builds will not be kept.
If a build that would have been kept is not kept because Dont keep failed is selected, then the next successful build will be kept.
Keep the first successful build every x days
This policy is similar to the Keep since last kept policy, except that the units are days, and failed builds are not kept.
Keep the first failed build in a run of failures
The first build to fail in a run of consecutive failed builds will be kept.