This controls the disk consumption of Jenkins by managing how long you'd like to keep records of the builds (such as console output, build artifacts, and so on.) Jenkins offers two criteria:
  1. Driven by age. You can have Jenkins delete a record if it reaches a certain age (for example, 7 days old.)
  2. Driven by number. You can have Jenkins make sure that it only maintains up to N build records. If a new build is started, the oldest record will be simply removed.
Jenkins also allows you to mark an individual build as 'Keep this log forever', to exclude certain important builds from being discarded automatically. The last stable and last successful build are always kept as well.