kuke delete¶
Delete a resource. Can be called per-resource (kuke delete realm foo) or against a manifest (kuke delete -f file.yaml).
kuke delete <resource> <name> [--cascade] [--force] [scope flags]
kuke delete -f <file>
kuke d <resource> <name> ... # alias
Persistent flags (inherited by every subcommand)¶
| Flag | Default | Description |
|---|---|---|
--cascade |
false |
Recursively delete child resources (realm → spaces → stacks → cells) |
--force |
false |
Skip validation; attempt deletion anyway |
--file, -f |
(empty) | Delete the resources listed in a YAML file |
--output, -o |
(empty) | Output format: json, yaml |
Plus all global flags.
Per-resource subcommands¶
kuke delete realm¶
kuke delete space¶
kuke delete stack¶
kuke delete cell¶
kuke delete blueprint¶
Removes the daemon-stored CellBlueprint document bound to the named scope. Cells previously materialised from this blueprint are independent copies and are not affected. --cascade does not apply — a Blueprint has no children in the resource hierarchy.
kuke delete config¶
Removes the daemon-stored CellConfig document bound to the named scope. The cells the Config stamped are not torn down — a Config is a 1:N binding, so it may have many live cells, each its own identity; delete them separately with kuke delete cell <name>. For every live cell still carrying this Config's kukeon.io/config lineage label, kuke delete config emits a one-line notice pointing at that cell to delete (never a refusal). --cascade does not apply — a Config has no children in the resource hierarchy.
kuke delete healthreport¶
Removes one stored HealthReport from the kuke-system realm. latest is not resolved: name the report (see kuke get healthreports). A report has no children, so --cascade does not apply.
kuke delete team¶
Deletes a stored team: its Configs, the shared blueprints no other Config references, and the Team document. It leaves cells and volumes: it prints each Config and blueprint it removed, the cells still running from a removed Config, and the state volumes (<config>-state) it kept. --realm defaults to default. It refuses the kuke system team — reset that with kuke team init --force.
$ kuke delete team web
Deleted CellConfig web-dev-claude
Deleted CellBlueprint claude-root
Deleted team web
Still running from a deleted config: cell default/default/default/web-dev-claude-1 (kuke delete cell to remove it)
Kept state volume default/default/default/web-dev-claude-state (kuke delete volume to remove it)
Deleting a team deletes no Source: the project and the sources it stored stay for other teams; delete them with kuke delete source.
kuke delete source¶
Deletes a stored Source. kukeond refuses it while a default role or harness of the realm's TeamDefaults, or a stored team — its project, a spec.sources entry, or a role or harness of its own — references it, and names each; nothing is deleted. --realm defaults to default. A name no Source stores fails with source not found.
$ kuke delete source agents
Error: source is in use: source agents is referenced by default role dev, team kukeon
$ kuke delete source old-fork
Deleted source old-fork
Behavior¶
- Without
--cascade, delete fails if the resource has children. It refuses to leave orphaned subtrees behind. - With
--cascade, children are deleted first (depth-first), then the parent. A realm cascade walks every space, stack, cell, and containerd container in it. - With
--force, validation is skipped — Kukeon will attempt to delete the metadata and tear down runtime state even when the host is in an unexpected state. Use it to recover from half-deleted resources.
Examples¶
# Delete an empty cell
sudo kuke delete cell web --realm default --space blog --stack wordpress
# Cascade-delete an entire user realm (all spaces, stacks, cells)
sudo kuke delete realm mytenant --cascade
# Delete every resource listed in a manifest
sudo kuke delete -f site.yaml
# Remove a daemon-stored CellBlueprint (materialised cells are untouched)
sudo kuke delete blueprint dev --realm kuke-system
# Remove a daemon-stored CellConfig (the live cell it owns is not torn down)
sudo kuke delete config kukeon-dev --realm kuke-system
# Remove one stored health report
kuke delete healthreport 20261122T101500.000000000Z
delete vs. purge¶
deleteremoves metadata and releases runtime state. If a detail fails (a cgroup that won't rmdir, a bridge that's in use), the command errors out.purgedoes everythingdeletedoes and then aggressively cleans up residual state. Use it whendelete --forceisn't enough.
Related¶
- kuke purge — more aggressive variant
- kuke uninstall — full-host teardown (every realm, system user/group, run path)
- Init and reset — full-host reset workflows