Cleanup of Work directories on Agents

Is there any way to automatically clean out stuff in this directory (]]>/buildAgent/work). We are finding that this directory is getting bigger and bigger and never gets cleaned (except individual directories if that build is re-run on that agent).

Say for instance if a build hasn't run on that agent for 7 days, can we automatically clean it up.

If not, can I manually delete work directories from this locations without removing them from the directory.map file.

Colin

2 comments

Colin,

What version of TeamCity do you use?

The working directories of the builds should be deleted automatically after two weeks since the build was run on the agent. You can change the default by specifying "teamcity.agent.build.checkoutDir.expireHours" property in the buildAgent.properties file. You can also delete the directories manually anytime. "directory.map" should never be edited manually.

BTW, if directory.map file is accidentally deleted the automatic deletion of unused directories will be broken.

--
Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Perfect, thanks. Works great

Colin

0

Please sign in to leave a comment.