Skip to main content

arcave savepoint remove

Deletes savepoints of the compose project, in the session the command works in, selected either by id or name, or by retention rules.

Synopsis
arcave savepoint remove [id|name...] [flags]

Flags​

FlagDefaultDescription
--retain-recent—Keep the newest N savepoints and delete the rest; 0 keeps none.
--retain-for—Keep savepoints younger than this duration, e.g. 1w2d3h4m5s.
--before-date—Delete savepoints created before this RFC3339Nano timestamp.
--dry-runfalseReport what would be deleted, and delete nothing.

Global flags apply — see the CLI reference.

--retain-for accepts w and d beside Go's own units (h, m, s, ms…), combined. --before-date does not accept a bare date: it wants a full timestamp, 2026-06-01T00:00:00Z.

The two selection modes​

By id or name — one or more as positional arguments, mixed freely. An argument that is a canonical UUID is an id; anything else is a name:

arcave savepoint remove 019e843e-1650-7000-8000-000000000000 before-migration

By retention rule — one or more of --retain-recent, --retain-for, --before-date:

arcave savepoint remove --retain-recent 5

The two cannot be mixed, and one of them is required. Both are refusals rather than defaults: a remove with nothing to go on would be a command that deletes everything by accident.

When several retention rules are combined, a savepoint survives if any one of them keeps it. --retain-recent 5 --retain-for 30d keeps the newest five and everything from the last thirty days; it does not intersect them.

--retain-recent 0 and --retain-for 0s delete every savepoint of this compose project in the session the command works in. Other compose projects, other sessions and safety snapshots are untouched. Look with --dry-run first.

Which savepoints a selector reaches​

SelectorReaches a safety snapshot?
An explicit idYes
An explicit nameNo
--retain-recent, --retain-for, --before-dateNo

A scanning selector cannot delete the last copy of a pre-rollback state by accident. Neither does a name, as in rollback. Removing a safety snapshot here is always deliberate, by id; arcave gc retires them by their own policy.

Output​

On a terminal, the final tree of the steps on stderr and a summary on stdout; in a script, or with --format json, JSON on stdout.

stderr + stdout
✔ savepoint.remove 1.0s
└── ✔ savepoint.drop 1/1 0.0s

Removed 1 savepoint:
before-migration · 019e843e-1650-7000-8000-000000000000 · 2026-06-01 19:41
FieldMeaning
dry_runWhether anything was actually deleted.
removedThe savepoints deleted — or, under --dry-run, the ones that would be — oldest first. Each is the whole record.

Under --dry-run the summary reads Would remove 1 savepoint:, and no tree is drawn. A selection that matches nothing is not an error: it prints Nothing to remove. on a terminal, removed is null in the JSON, and the exit code is 0.

Deletion is permanent. It frees the savepoint's own directory; the deduplicated image blobs and images it shared with other savepoints, and its cdc snapshots, stay where they are. arcave gc deletes the blobs and images no remaining savepoint uses, and forgets and prunes the snapshots; deleting the whole session gives everything back — see session remove.

Errors​

ConditionWhat happens
Ids and retention rules togethercannot combine savepoint ids or names with retain-recent/retain-for/before-date
Neitherspecify savepoint ids or names, or at least one of retain-recent, retain-for or before-date
An id or name with --retain-recent 0cannot combine savepoint ids or names with retain-recent/retain-for/before-date — 0 is a rule like any other.
A negative --retain-recentretain-recent must be zero or positive
A negative --retain-for, e.g. -1hretain-for must be zero or positive
An unparseable durationinvalid --retain-for "2 weeks": …
A bare date in --before-dateinvalid --before-date "2026-06-01": … — it takes RFC3339Nano.
An id or name that is not theresavepoint(s) not found: 019e843e-1650-7000-8000-000000000000, and nothing is deleted. Every such argument is named. There are no partial deletes: one typo in a list of five removes none of them.
A name several savepoints carry2 savepoints are named "clean"; name one by id instead: 019e843e-1650-7000-8000-000000000000, 019e8488-3ac8-7000-8000-000000000000, and nothing is deleted.
An interrupted rollback is markedrollback to savepoint 019e843e-1650-7000-8000-000000000000 was interrupted (restoring); recover by rolling back to 019e8491-04c8-7000-8000-000000000000. While the marker stands every removal but --dry-run is refused, by id or by rule: its safety snapshot is the remedy. Recover the rollback first.
Another arcave run holds the lockanother arcave command is already running in this project. --dry-run takes no lock and is unaffected.

Each removal uncommits the record first and drops the data second. A removal killed halfway therefore leaves data no record names — invisible to savepoint list — rather than a record pointing at data that is already half gone. What it leaves is named in the log.

Examples​

Preview first
arcave savepoint remove --retain-recent 5 --dry-run
Keep a rolling window
arcave savepoint remove --retain-recent 10
Keep the last two weeks
arcave savepoint remove --retain-for 2w
Drop everything before a cutover
arcave savepoint remove --before-date 2026-06-01T00:00:00Z
Delete every savepoint, keep the undos
arcave savepoint remove --retain-recent 0 --dry-run
arcave savepoint remove --retain-recent 0
Delete a safety snapshot, once the environment is right
arcave savepoint list --include-safety-snapshots
arcave savepoint remove 019e8491-04c8-7000-8000-000000000000

Until you have confirmed the environment, that snapshot is the last copy of the pre-rollback state.

Retention rules do not know which savepoint matters​

A seeded clean baseline is deleted by --retain-recent 5 as soon as five newer savepoints exist. A savepoint that has to survive indefinitely is removed around by id or name, never by a rule, or kept in a session of its own that the retention runs never name.

Next step​

Storage layout — what a savepoint occupies, and what removing one frees.

Tools and expertise for reproducible, production-like environments.
Copyright © 2026 Greenmask, Inc.
Privacy Policy