Removing clean-up rules from build configuration template


In TeamCity 2018 I had some build configuration templates that defined their own clean-up rules. I've upgraded to 2021 and it looks like this was deprecated, though still partially supported for legacy reason. I'm fine with the deprecation and would like to not use a feature that TeamCity isn't keen on me using, but how do I now remove the clean-up from the templates? I can see the rules as being an inherited rule of the build configurations that implement that template, and I can see a way to edit that clean-up rule, but no way to remove it. Thoughts?

Comment actions Permalink


Unfortunately, yes, when the clean-up rules on build configuration templates were deprecated, ability to edit them via UI was lost. As a workaround, you could modify the XML files representing the templates which may be found on the following path:

<Data Directory>\config\projects\<project ID>\buildTypes\<template ID>

Specifically, you would need to remove the following section:


The change should be applied automatically in a few minutes after the file is modified (TeamCity will re-read the XML file in the background once the change is detected). Could you please let me know if this works for you?

Also, project rules have priority over the template ones, so, unless there are no rules defined on the project level, template rules would not have an effect. 

Comment actions Permalink

See also YouTrack task TW-72196 about the problem.

Comment actions Permalink



Please sign in to leave a comment.