watchtower icon indicating copy to clipboard operation
watchtower copied to clipboard

Cleanup option does not seem to work.

Open heyitschloehawthorne opened this issue 8 months ago • 3 comments

Describe the bug

I've been using watchtower for the past year or so and I really like how seamless it runs, but I've never been able to get the WATCHTOWER_CLEANUP option to work.

My docker_compose.yml is as follows.

watchtower: image: containrrr/watchtower container_name: watchtower environment: - WATCHTOWER_HTTP_API_METRICS=true - WATCHTOWER_HTTP_API_TOKEN=censored - WATCHTOWER_NOTIFICATION_REPORT=true - WATCHTOWER_NOTIFICATION_URL=generic://notifiarr.com/api/v1/notification/watchtower> - WATCHTOWER_CLEANUP=true volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - 800:8080 restart: unless-stopped

I removed and restarted the container, so I don't have the logs at the moment, but once it runs an update I'll add them to this issue. I did not see any mention of the cleanup in the logs, though.

Steps to reproduce

  1. Pull and run Watchtower using my docker_compose.yml file.
  2. Wait for a container to update.
  3. Get frustrated when your SSD fills up in three days.

Expected behavior

Cleanup option should be removing old container images upon completing updates.

Screenshots

No response

Environment

Docker 27.3.1 on Debian 12 x86_64

Your logs

time="2025-04-29T04:03:30Z" level=info msg="Watchtower 1.7.1"

time="2025-04-29T04:03:30Z" level=info msg="Using notifications: generic"

time="2025-04-29T04:03:30Z" level=info msg="Checking all containers (except explicitly disabled with label)"

time="2025-04-29T04:03:30Z" level=info msg="Scheduling first run: 2025-04-30 04:03:30 +0000 UTC"

time="2025-04-29T04:03:30Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"

Additional context

No response

heyitschloehawthorne avatar Apr 29 '25 04:04 heyitschloehawthorne

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

github-actions[bot] avatar Apr 29 '25 04:04 github-actions[bot]

Having same issue

Bruxes avatar May 02 '25 09:05 Bruxes

Hello,

I have the same issue, i tried use with command also, whithout sucess.

kerhisNicolas avatar Aug 08 '25 13:08 kerhisNicolas