So I have a project with large amount of build logs which previously inherited "delete after 91 days" rule from grandparent project.

I am adding the specific "delete after 31 days" rule to this project via Kotlin DSL configuration and it is displayed in this project's Clean-up Rules section.

However, after pushing Administration -> Clean-up Settings -> Start clean-up now, the disk space is not reclaimed and the builds older than 31 days still have their logs available via TeamCity UI. Waiting for a periodic clean-up does not help - the logs are still there and accessible. The logs which were older than 91 days were pruned correctly. However, when I set up the 91 days rule initially, I had the similar issue and had to remove old logs by hand.

Why does not Clean-up work as expected?

TeamCity runs as a local user (not in docker), owns the log files. They are not cleaned since TeamCity can still show logs way after they are supposed to be cleaned up. Nothing in logs. Actually, cleanup logs list some build ids to be cleaned, but when I go to these builds' pages, logs are still available there!

  • I think you already answered your own question. Do it manually.
    – Marcel
    Commented Oct 24, 2022 at 13:31
  • But there's a feature for that, I would expect it to work if it exists.
    – alamar
    Commented Oct 24, 2022 at 16:47
  • Now I can't even get these logs to be cleaned up after 91 days. It's as if my manual cleaning efforts tripped the automatic process and it broke down completely.
    – alamar
    Commented Jul 10, 2023 at 17:15
  • How's it deployed? Docker? Dropped jar? Which user does it runs as? Does the user the jar run as have permissions to all its folders? What have you done to verify that the files are not being removed? Any logs showing the failure to clean up / remove old logs?
    – Marcel
    Commented Jul 11, 2023 at 8:58
  • Updated @Marcel
    – alamar
    Commented Jul 11, 2023 at 22:52


You must log in to answer this question.

Browse other questions tagged .