CLI commands
Uninstall CLI
openclaw uninstall
Uninstall the Gateway service and/or local data. There is no separate CLI-removal scope. Remove any remaining CLI through the installation-specific steps.
Options
| Flag | Default | Description |
|---|---|---|
--service |
false |
Remove the Gateway service. |
--state |
false |
Remove state and config. |
--workspace |
false |
Remove workspace directories. |
--app |
false |
Remove the macOS app. |
--all |
false |
Shorthand for --service --state --workspace --app. |
--yes |
false |
Skip confirmation prompts. |
--non-interactive |
false |
Disable prompts; requires --yes. |
--dry-run |
false |
Print planned actions without removing files. |
With no scope flags, an interactive multiselect prompts for which components
to remove (defaults to the Gateway service only). Take an archive with
openclaw backup first if you may want the state back.
Examples
openclaw backup createopenclaw uninstallopenclaw uninstall --service --yes --non-interactiveopenclaw uninstall --state --workspace --yes --non-interactiveopenclaw uninstall --all --yesopenclaw uninstall --dry-runNotes
Uninstall reports each requested scope and exits nonzero if any requested cleanup fails or is blocked. A failed gateway service inspection, stop, or uninstall blocks state and workspace mutation, but independent macOS app cleanup is still attempted. After service teardown is safe, other permitted scopes continue so failures can be reported together. On non-macOS systems, --app reports that the scope is not applicable.
- Run
openclaw backup createfirst for a restorable snapshot before removing state or workspaces. - Before removing state,
--staterequires exclusive state ownership. If an unmanaged or externally supervised Gateway is still running, uninstall refuses and asks you to stop it first. --statepreserves configured workspace directories unless--workspaceis also selected.