TeamCity 4.0 Help

Clean-Up

A clean-up policy defines how to clean up build data (build log messages, developers' changes, artifacts, statistical data and so on). The clean-up policy contains a number of rules, which can be defined for a specific build configuration, and a default policy for all build configurations. In each rule, you can define a number of successful builds to preserve, and/or a length of time that builds should be kept in history (e.g. keep builds for 7 days). These rules do not apply to pinned builds (see Pinned Build). Builds used as source for Configuring Dependencies in other builds are also preserved in history and don't depend on the clean-up policy.

Each clean-up rule defines data to clean up. The following options are available:

  • remove only the build artifacts

  • remove the build history entry (the build will be preserved only in the statistics charts)

  • remove everything

See Build History Clean-Up Policy for more details about clean-up policies configuration.

Clean-Up for Dependent Builds

TeamCity preserves builds that are used in other builds by either Dependent Build.

You can enable/disable preventing artifacts of the builds this configuration depends on from cleanup using Dependencies option in the Build History Clean-Up Policy. By default, the Prevent dependency artifacts cleanup option is enabled, and artifacts of the builds used in the configured build will not be cleaned up. If the option is disabled, artifacts will be cleaned up according to usual artifact cleanup policy.

Last modified: 20 April 2023