Clean-Up
Last modified: 20 April 2023Clean-Up is a process that is run regularly and removes clean-up rules-matching builds from the build configuration history. The process cleans build data stored on the server. This allows to clean disk space and remove obsolete builds from UI.
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 disable this behavior disabling an option in Dependencies section of the Build History Clean-Up Policy. If Prevent dependency artifacts cleanup option is enabled (this is the default), cleanup will not affect the builds that produced artifacts that were used in the builds of the Build Configuration being configured. If the option is disabled, the builds will be cleaned up according to usual cleanup policy.
Thanks for your feedback!