Images Command
List and prune runtime/registry images.
gordon images
gordon images <subcommand>
Subcommands:
list- List runtime images and registry tags.prune- Prune dangling runtime images and optionally registry data.
Note: Images commands require remote mode (
--remote+--token, or configured remotes).
gordon images list
gordon images list
Shows image rows with repository, tag, size, creation time, image id, and dangling status.
Rows that exist only in the registry (not currently present in the runtime cache) are included with unavailable runtime fields shown as -.
gordon images prune
gordon images prune [--dry-run] [--keep <n>] [--runtime-only]
Flags:
| Flag | Default | Description |
|---|---|---|
--dry-run |
false |
Show prune behavior without applying changes |
--keep |
0 |
Number of previous tags to keep per repository (latest is always preserved when present; 0 disables registry cleanup) |
--runtime-only |
false |
Prune dangling runtime images only; forces registry cleanup off |
--keep defaults to 0 for ad-hoc CLI safety (registry cleanup off by default), while scheduled pruning uses images.prune.keep_last from config (default 3). Use config for recurring behavior; when a CLI --keep value is provided, that request value is used.
Behavior notes:
--runtime-onlyforceskeep_last = 0.--keepmust be>= 0.--dry-runreports what would be pruned.- When
--keepis greater than0, registry cleanup keepslatest(if present) plus the requested number of most-recent non-latesttags.
Examples
# List images
gordon images list
# Prune dangling runtime images only
gordon images prune --runtime-only
# Prune runtime images and keep latest + 3 previous tags per repository
gordon images prune --keep 3
# Preview cleanup without applying
gordon images prune --dry-run --keep 5
Required Permissions
listrequiresadmin:status:read.prunerequiresadmin:config:write.