4
votes

I'm running TeamCity 5. I have one particular configuration that is preserving 3500+ past builds, with artifacts, from the last year or so. It's taking up almost 7 gigs of space so I need to clean up old builds.

The configuration is set to clean up everything older than 30 days or 5 builds. None of the builds are pinned. No configurations on the server depend on the artifacts, and even if they did I have un-set "Prevent dependency artifacts clean-up". Other build configurations clean up, but this particular one doesn't.

Anybody have ideas on what to check next?

1

1 Answers

6
votes

I figured it out. I wasn't understanding how TeamCity is preserving old builds. It's preserving all builds since the fifth oldest successful build, and the fifth successful build was a year ago. I reduced the cleanup rule to "Clean artifacts more than 30 days older than the last build and older than the 1st successful build", and got rid of some of the history. Now, to get the devs to fix their unit tests so this is successful more often... ;)

Also, you can leave the "-th successful build" field blank and limit just on days.