v2.15.0 cf76057

images.md RawHistoryFolder

Images Command

List and prune runtime/registry images.

gordon images

gordon images <subcommand>

Subcommands:

  • list - List runtime images.
  • 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.

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 latest tags to keep per repository (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-only forces keep_last = 0.
  • --keep must be >= 0.
  • --dry-run reports what would be pruned.

Examples

# List images
gordon images list

# Prune dangling runtime images only
gordon images prune --runtime-only

# Prune runtime images and keep 3 newest tags per repository
gordon images prune --keep 3

# Preview cleanup without applying
gordon images prune --dry-run --keep 5

Required Permissions

  • list requires admin:status:read.
  • prune requires admin:config:write.
source
1# Images Command
2
3List and prune runtime/registry images.
4
5## gordon images
6
7```bash
8gordon images <subcommand>
9```
10
11Subcommands:
12
13- `list` - List runtime images.
14- `prune` - Prune dangling runtime images and optionally registry data.
15
16> **Note:** Images commands require remote mode (`--remote` + `--token`, or configured remotes).
17
18## gordon images list
19
20```bash
21gordon images list
22```
23
24Shows image rows with repository, tag, size, creation time, image id, and dangling status.
25
26## gordon images prune
27
28```bash
29gordon images prune [--dry-run] [--keep <n>] [--runtime-only]
30```
31
32Flags:
33
34| Flag | Default | Description |
35|------|---------|-------------|
36| `--dry-run` | `false` | Show prune behavior without applying changes |
37| `--keep` | `0` | Number of latest tags to keep per repository (`0` disables registry cleanup) |
38| `--runtime-only` | `false` | Prune dangling runtime images only; forces registry cleanup off |
39
40`--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.
41
42Behavior notes:
43
44- `--runtime-only` forces `keep_last = 0`.
45- `--keep` must be `>= 0`.
46- `--dry-run` reports what would be pruned.
47
48## Examples
49
50```bash
51# List images
52gordon images list
53
54# Prune dangling runtime images only
55gordon images prune --runtime-only
56
57# Prune runtime images and keep 3 newest tags per repository
58gordon images prune --keep 3
59
60# Preview cleanup without applying
61gordon images prune --dry-run --keep 5
62```
63
64## Required Permissions
65
66- `list` requires `admin:status:read`.
67- `prune` requires `admin:config:write`.
68
69## Related
70
71- [CLI Commands](./index.md)
72- [Images Configuration](../config/images.md)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close