Skip to content

updater: old Core, updater and optimizer images are never removed, so every beta update eats disk #1305

Closed

Description

@frahlg

Observed

ftw-updater pulls a new image for every update and never removes the images it replaced. There is no image rm or prune anywhere in go/cmd/ftw-updater/main.go, and the docs do not tell an operator to prune.

On the owner's Raspberry Pi 4 (beta channel since spring) on 2026-09-17:

Item Value
docker system df images 221 images, 12.57 GB, 12.19 GB (97 %) reclaimable
Root filesystem 117 GB, 93 % used, 8.7 GB free
Per beta update Core 275 MB + updater 237 MB; optimizer 760 MB per new optimizer version

Many images on that box are review builds a normal tester never sees, but the versioned ghcr.io/srcfl/ftw:v3.2.0-beta.1 … v3.5.0-beta.1 and matching updater images accumulate on every beta box. A tester who never uses SSH cannot reclaim them. A full disk then breaks the next update itself: the pull fails, and the rollback point cannot be written.

Proposed behaviour

After an update has passed its health check and the terminal state is written, remove images of the same repository that are neither the running image nor previous_image_id (kept for rollback). Never remove an image that a container still references. Report the reclaimed bytes in the update job history. Do the same for the optimizer and the updater's own image after a self-replace.

Do not touch images from other repositories or user-built images.

Not in scope

Cleanup of pre-conversion copies and migration leftovers in the data directory (history.duckdb, history-hot.db, *.converting) is a Core concern after a verified history conversion; track separately if wanted.

Related: #1302 (update rollback point).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions