How to uninstall OpenClaw completely
Removing OpenClaw properly takes three steps: stop the background service, remove the package, and decide what happens to your agent's data. In order.
Three steps, in this order: stop the background service so it can’t respawn (openclaw gateway stop --disable), remove the package (npm uninstall -g openclaw), and then decide deliberately about ~/.openclaw — the directory holding your agent’s memory, config, and credentials. Deleting the package without handling the service and the state directory is why “it’s still running” and “my keys are still on disk” are the two classic uninstall surprises.
Step 1: stop the Gateway — permanently
The install registered the Gateway as a supervised background service (launchd on macOS, a systemd user service on Linux, a Scheduled Task named “OpenClaw Gateway” on Windows) — and supervised services are built to come back. A plain stop can be undone by the supervisor’s auto-restart or the next reboot; what you want is:
openclaw gateway stop --disable— stop and disable respawn. This is the step people skip, and the reason an “uninstalled” agent greets them after the next reboot. Verify with openclaw gateway status before moving on (on Windows, Task Scheduler should no longer show the task as ready).
Step 2: remove the package
npm uninstall -g openclawThe mirror image of the install. For Docker setups the equivalent is docker compose down plus removing the images — and the same warning applies double: the volumes ARE your agent; down alone leaves them, adding -v destroys them.
Step 3: the state directory — a decision, not a deletion
Uninstalling the package leaves ~/.openclaw untouched, and that’s the right default: that directory is your agent — its memory, identity, sessions, config, and stored credentials (model keys, channel tokens, linked-session secrets). Choose deliberately:
- Taking a break, or moving the agent elsewhere? Keep the directory — or better, archive it as a backup. An agent can be resurrected on any machine from this folder alone.
- Leaving for good? Delete it — and remember it contained secrets: revoke the model API key at your provider, and unlink any channel sessions (e.g. WhatsApp’s linked device) rather than just deleting their credential files. Then check for stragglers: any auth secrets under
~/.config/openclaw, and old backups or snapshots of the machine, which contain everything the live directory did.
The checklist version
openclaw gateway stop --disable→ verify withstatusnpm uninstall -g openclaw(or Compose down + images)- Decide: keep/archive
~/.openclawor delete it - If deleting: revoke the model key, unlink channels, remember backups hold copies
(If the reason you’re uninstalling is that operating it stopped being fun rather than the agent itself — that’s a hosting problem, not an OpenClaw problem, and it has gentler fixes than deletion.)