lium rm
Remove / stop pods.
lium rm [TARGETS] [OPTIONS]
Arguments
TARGETS— Pod name, index, comma-separated list, orall.
Options
| Flag | Effect |
|---|---|
--all, -a | Remove all active pods |
--yes, -y | Skip the confirmation prompt on --all and, since 0.0.34, on row-number targets |
--in DURATION | Schedule removal after a duration (e.g. 6h, 45m, 2d) |
--at TIME | Schedule removal at a local time (e.g. "tomorrow 09:00") |
--name-only | Treat TARGETS as ids, names or huids only — never as lium ps row numbers (for scripts); LIUM_NO_POD_INDEX=1 does the same for every command (since 0.0.34) |
Removal is irreversible. The command exits non-zero when nothing matched
TARGETS, so a typo cannot look like a successful teardown. Since lium 0.0.34 a
row number (lium rm 1) stands for the pod your last lium ps in this
shell showed on that row, for 10 minutes and while that pod is still listed; the
number is translated to that pod's id, so a list that reordered since still
resolves to the pod you saw. When that pod is gone, the listing is older than 10
minutes, or no lium ps ran in this shell, rm refuses with exit 2
(stale_pod_index) — naming the pod the row was when it has gone — and the pod
that holds the row now is left untouched. One exception: a pod whose name, id or huid
is literally that number still matches by name in every one of those cases, and
is removed without the index confirmation, as any named pod is. A number beyond
the last listing is tried as a name and exits 5 (pod_not_found) when no pod
has it. Scripts pass the huid or --name-only. 0.0.33 read the number as a position in the live list at
the moment of the command. --all on an account with no pods is the opposite
case: a no-op that exits 0.
Two things ask for confirmation: lium rm --all, and (since 0.0.34) a
row-number target. A row number is first spelled out as the pod it stands for —
Pod 1 → eager-wolf-aa (name: train), printed with or without -y — then
Remove 1 pod(s) selected by index? is asked unless you passed --yes. Without
a terminal (a pipe, a script, LIUM_NONINTERACTIVE=1) and without --yes, rm
asks nothing and refuses with exit 2 (confirmation_required) since lium
0.0.38; 0.0.34 to 0.0.37 removed the row-number targets without asking.
Removing a pod named by huid, name or id never prompts.
Examples
lium rm my-pod # Remove a single pod
lium rm 1,2,3 # Remove several
lium rm all # Remove every active pod (positional)
lium rm --all # Same, via the flag
lium rm --all -y # Remove everything without the confirmation
lium rm my-pod --in 6h # Schedule removal in 6 hours
lium rm my-pod --at "tomorrow 09:00"
lium rm eager-wolf-aa --name-only # In a script: never a row number — since 0.0.34
See also
lium schedules— view / cancel scheduled removals (created vialium up --ttl)lium volumes— manage detached volumes