canasta image prune
canasta image prune
Garbage-collect the in-cluster image registry
Synopsis
Reclaim in-cluster registry storage by deleting manifests no tag references anymore, and their orphaned layers. Repeated pushes of the same tag (e.g. the :local tags used by --build-from and build: sidecars) orphan the previous push's layers, and nothing else ever garbage-collects them — the registry volume only grows until this runs.
Runs the registry's garbage collector (with --delete-untagged) inside the registry pod, then restarts the registry deployment so its in-memory blob cache matches the pruned store. Avoid pushing images while the prune runs — a push racing the garbage collector can be corrupted (a limitation of the registry itself).
Kubernetes only. A host with no in-cluster registry reports nothing to prune.
canasta image prune [flags]
Examples
canasta image prune
canasta image prune -H prod1
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--host |
-H |
Target host (a saved host name or user@hostname; default: localhost) | Both |
Global flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |