Any way to quickly clean ALL checkout directories from an Agent?
Answered
Hi everyone, I was wondering if there was any feature in TeamCity where you could quickly clear all current Checkout directories from an agent.
The reason I'd want to do this is, sometimes people will build using the same one all the time, and those checkout directories can sometimes be large and fill up the server. We can just go in and manually clean them, but I was wondering if there was any way to just wipe them all clean and force further builds to re-checkout the code. Is there any function like that?
Please sign in to leave a comment.
You can use the Build Files Cleaner build feature to remove the files after each build is complete. Please refer to our documentation available here: https://www.jetbrains.com/help/teamcity/build-files-cleaner-swabra.html
There is also the Free Disk Space build feature, which will first check for enough space on the agent before beginning the build. For details on how this works, please see our documentation here: https://www.jetbrains.com/help/teamcity/free-disk-space.html
The Free Disk Space build feature looks like exactly what we need. Thank you, that will be really helpful.
It's not quite what we wanted, but it'll be good enough for our purposes.