Skip to content

fix(update): remove the previous stack images after a nightly update - #406

Merged
catinspace-au merged 2 commits into
mainfrom
fix/selfupdate-prune
Nov 16, 2026
Merged

catinspace-au merged 2 commits into
mainfrom
fix/selfupdate-prune

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

Self-update left a full set of images from the old pin after each update. The VM disk reached 92%.

  • Before the re-pin it lists the images docker compose resolves to across all profiles.
  • After make ci and its self test pass, it runs docker image rm on each one the new stack no longer names and no container uses.
  • Images pulled by hand are not touched.
  • A failed update removes nothing.
  • A removal error logs a warning and the update still succeeds.

Self-update left a full set of images from the old pin after each update. The VM disk reached 92%.

- Before the re-pin it lists the images docker compose resolves to across all profiles.
- After make ci and its self test pass, it runs docker image rm on each one the new stack no longer names and no container uses.
- Images pulled by hand are not touched.
- A failed update removes nothing.
- A removal error logs a warning and the update still succeeds.
A previous pin of x:1 and a new pin of x:1@sha256:abc are one image. The string comparison treated them as different images. docker image rm x:1 could therefore untag an image the new stack uses.

Each reference matches name:tag and, if it has a digest, name@digest. A previous image is kept if either form matches the new stack or a container.
@catinspace-au
catinspace-au merged commit 87a9005 into main Nov 16, 2026
16 checks passed
@catinspace-au
catinspace-au deleted the fix/selfupdate-prune branch November 16, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant