Skip to content

delete

Delete a deck, collection, or wanted list, along with all of its sidecar files.

Terminal window
./ritual delete <list> [options]

<list> is resolved across all three list types (see List Resolution); pass a --deck, --collection, or --wanted flag (or a deck:/collection:/wanted: prefix on the name) to pin the type or disambiguate.

Deletion is destructive, so it must be confirmed with the list’s display name (not its slug) — the same confirmation the admin site asks for. Pass it with --confirm; without the flag, an interactive terminal names the resolved target and prompts for its exact display name, and a non-interactive run exits with a usage error pointing at --confirm:

About to delete deck 'Modern Burn' (decks/Modern Burn.md) and its sidecar files.
? Type 'Modern Burn' to confirm: ›

Note the two halves are addressed differently on purpose: <list> is resolved (so a partial, differently-cased, or colon-carrying display name finds the list), while --confirm must be the display name character for character.

ArgumentDescriptionRequired
<list>Name of the deck, collection, or wanted list (case- and accent-insensitive, no extension)Yes
OptionDescriptionDefault
--deckResolve the name as a deck
--collectionResolve the name as a collection
--wantedResolve the name as a wanted list
--confirm <name>The list’s display name, confirming the deletion
--output <format>Output format: text, json, or ndjsontext
--quietSuppress non-essential outputfalse

Delete a deck non-interactively:

Terminal window
./ritual delete deck:burn --confirm "Modern Burn"

Delete a collection and capture the result as JSON:

Terminal window
./ritual delete --collection main --confirm "Trade Binder" --output json

The JSON payload is { type, slug, deleted: true, deletedFiles }, where deletedFiles lists every path removed — the list plus whichever sidecars it had.

Deleting a list removes the markdown file and every sidecar it may have: the .sha256 content hash, the .changes.md changelog, the .art.json custom art map, and — for decks — the .primer.md primer. Nothing is deleted until the confirmation name matches the display name exactly.

CodeMeaning
0Success
2Usage error (conflicting type flags, a deck:/collection:/wanted: prefix contradicting a type flag, ambiguous list, wrong confirmation name, no terminal and no --confirm)
3Not found (no list matches <list>)
1Runtime error