Unable to render embedded object: File (TeamCity48.png) not found.

TeamCity 10.x and 2017.x Documentation


You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.


Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: related to https://youtrack.jetbrains.com/issue/TW-47639


The build checkout directory is a directory on the TeamCity agent machine where all of the sources of all builds are checked out into.

  • If you use the agent-side checkout mode, the build agent checks out the sources into this directory before the build.
  • In case you use the server-side checkout mode, the TeamCity server sends  incremental patches to the agent to update only the files changed since the last build in the given checkout directory



  • out but the default build checkout directory will still be created to check out the sources via a build script. The directory will not be cleaned automatically unless as its expiration period is configured as described below.

The sources are placed into the checkout directory according to the mapping defined in the VCS Checkout Rules.


Automatic Checkout Directory Cleaning

Checkout With the server-side and agent-side checkout modes, checkout directories are automatically deleted from the disk if not used (no builds were run on the agent using the directory as the checkout directory) for a specified period of time (8 days by default) or when another build requires more free disk space than available. With  manual checkout mode, automatic directory cleaning is not performed unless the directory expiration period is configured.

Wiki Markup
{hidden-data}old section name for obsolete anchors:{hidden-data}
Cleaning Directory in Background
Cleaning Directory in Background


Setting the property to "0" will cause deleting the checkout directories right after the build finishes.
Setting the property to "never" will let TeamCity know that the directory should never be deleted by TeamCity.
Setting the property to "default" will enforce using the default value.

Expiration-based directory cleaning is performed in the background when the build agent is idle (no builds are running).

See the Free disk space build feature to ensure the build gets enough disk free space on the build agent by cleaning the checkout directory automatically.

Note: with the Do not check out files automatically mode, no sources will be checked out and the directory will not be cleaned automatically as described above. 

See also:


Administrator's Guide: Configuring VCS Settings