microagent delete
Last updated: 2026-06-14
microagent delete <name> [--yes] [--force] [--state-dir <dir>]delete removes the workspace record and its on-disk artifacts (rootfs,
bundles, state file). It’s the end of the line - to shut a workspace down and
keep it, use halt instead.
By default, delete asks for confirmation. If the workspace is running, it
asks whether to stop and delete it. Use --yes for non-interactive cleanup.
Use --force to kill a running workspace before deleting it.
Examples
Section titled “Examples”Delete a workspace (asks for confirmation):
microagent delete researchNon-interactive cleanup:
microagent delete research --yesmicroagent delete research -yForce-delete a running workspace:
microagent delete research --forceLower-level form:
microagent delete agent-1 --state-dir /tmp/microagentFlags you’ll actually use:
--yes/-y- skip the confirmation prompt in scripts--force/-f- kill a running workspace first instead of refusing
The complete set:
| Flag | Description |
|---|---|
--name <name> | Workspace name; positional name is also accepted |
--id <id> | Workspace ID alias for --name |
--state-dir <dir> | State directory holding the workspace record (default ~/.microagent/) |
--backend <name> | Backend identity override |
--supervisor <path> | Override the installed host backend supervisor path |
--yes, -y | Confirm deletion without prompting |
--force, -f | Kill a running workspace before deleting |
See global flags for --json/--text/--output/--mode/--supervisor.
Exit status
Section titled “Exit status”delete exits 0 when the workspace and its artifacts are removed; nonzero
when the workspace cannot be found or removed, or when a running workspace
cannot be stopped or killed before deletion. A non-interactive run without
--yes that would require confirmation also fails rather than prompting
blindly. In AX mode a failure is written as a structured error envelope (a
missing workspace maps to not_found).