Clean-Up

Search
Searching TeamCity 4.x Documentation
Table of Contents

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 artifact dependency 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 snapshot dependencies or artifact dependencies.

You can enable/disable preventing artifacts of the builds this configuration depends on from cleanup using Dependencies option in the Edit Clean Up Rules. 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.




See Also:

Labels