Agent Work Directory
Agent work directory is the directory on a build agent that is used as a containing directory for the default Build Checkout Directory. By default, this is the <Build agent home> /work directory.
To modify the default directory location, see Build Agent Configuration.
For more information on handling the directories inside the agent work directory, please refer to Build Checkout Directory section.
Cleaning Directory in Background
Set teamcity.agent.use.delete.via.move in buildAgent.properties to 'false' to disable move. By default 'true' is set
Set teamcity.agent.ensure.free.space with bytes to ensure space under build configuration folder. Set teamcity.agent.ensure.free.temp.space with bytes to ensure space under test folder.
If teamcity.agent.ensure.free.temp.space is not defined value of teamcity.agent.ensure.free.space is taken.
Values are looked in the following way:
build configuration system property
buildAgent.properties property
default value = 3GiB.
Value is in bytes. kb, mb, gb, kib, mib, gib are supported.
If build agent does not have required free space under temp or build checkout folders, .old directories cleanup is started.