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 file.


Comment actions Permalink


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 "" property in the file. You can also delete the directories manually anytime. "" should never be edited manually.

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

Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
"Develop with pleasure!"

Comment actions Permalink

Perfect, thanks. Works great



Please sign in to leave a comment.