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.


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.

The checkout directory is configured in the Checkout Settings section on the Version Control Settings page; the default Auto (recommended) value is strongly advised, but it is possible to configure a custom checkout directory as described below.

If you want to investigate an issue and need to know the directory used by the build configuration, you can get the directory from the build log, or you can refer to the <Agent Work Directory>/directory.map generated file which lists build configurations with the directories they used last.


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.

It is recommended to use the Free disk space build feature to ensure the build gets enough disk free space on the build agent.

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

There are also obsolete manual controls for old checkout directories cleanup:

The time frame for automatic directory expiration can be changed by specifying a new value (in hours) by either of the following ways:

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