Remote OpenClaw Blog
Uninstall OpenClaw
4 min read ·
Uninstall OpenClaw with openclaw uninstall if the CLI is still installed. As of April 2026, the
official docs recommend openclaw uninstall --all --yes --non-interactive for full unattended
removal, then manually removing the CLI package you originally installed.
Quick Command
The official uninstall path is the built-in OpenClaw uninstaller documented at the install guide and the CLI reference.
Use this when the CLI still works:
openclaw uninstall --all --yes --non-interactive
If you may want a restorable snapshot first, the official docs also point to
openclaw backup create before removing state or workspaces. The docs also show an
npx -y openclaw uninstall --all --yes --non-interactive fallback for automation.
What Gets Removed
The uninstall flags split OpenClaw cleanup into service, state, workspace, and app scopes.
| Scope | What it targets | How the docs surface it |
|---|---|---|
--service |
The gateway service registration | Covered in the uninstall command reference and the gateway runbook |
--state |
Local state and config | Defaults to ${OPENCLAW_STATE_DIR:-$HOME/.openclaw} unless you changed it |
--workspace |
Workspace directories | Explicitly listed in the CLI reference and manual cleanup path |
--app |
The macOS app bundle | Relevant only if you installed the app |
--all |
Service, state, workspace, and app together | Documented as shorthand in the CLI reference |
The package-manager install is separate. The official uninstall guide says to remove the CLI afterward with
npm rm -g openclaw, pnpm remove -g openclaw, or bun remove -g openclaw,
depending on how you installed it.
Manual Path
The manual fallback keeps the same order as the official uninstall guide.
When the CLI still exists but you want explicit control, the docs show this sequence:
- Run
openclaw gateway stop. - Run
openclaw gateway uninstall. - Delete the state directory:
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}". - Optionally delete the workspace:
rm -rf ~/.openclaw/workspace. - Remove the CLI install from npm, pnpm, or Bun.
The
gateway runbook
is worth checking before and after cleanup because it shows the supported stop and health-check commands and notes
that gateway status --deep can detect stale launchd, systemd, or scheduled task installs.
When the CLI Is Gone
The official docs include a separate fallback for hosts where the service is still running but the CLI is missing.
On macOS, the uninstall guide shows a launchd cleanup path using labels like ai.openclaw.gateway
and deleting the related plist under ~/Library/LaunchAgents. On Linux, the same doc points to the
systemd user service file and daemon reload path. If you used profiles, the docs say to repeat the cleanup for
each profile-specific state directory and service label.
The same page also notes that remote mode matters: if your gateway runs on another host, the service, state, and workspace cleanup steps need to happen on that gateway host too.
Before You Reinstall Later
A clean uninstall is mostly about knowing what not to keep by accident.
If you plan to reinstall later, keep a backup first, then verify the old state directory and service are really
gone before starting again. That avoids dragging stale profiles, stale gateway services, or half-removed
workspaces into the new install. If you only wanted a reset rather than a full removal, the official CLI also has
a separate openclaw reset flow for config and state cleanup without uninstalling the CLI.
Limitations and Tradeoffs
The built-in uninstaller is the right default, but it is not magic. It only cleans up the scopes you ask it to
clean up, and package-manager removal is still separate. If you are trying to preserve a workspace or only remove
a stale service, --all is the wrong choice. If the CLI has already disappeared, you are in manual
cleanup territory and should follow the service-specific steps in the official uninstall guide instead of guessing.
Related Guides
- OpenClaw Install Guide
- OpenClaw Docs Guide
- OpenClaw Security Hardening
- How to Set Up OpenClaw AI Agent
FAQ
What is the fastest way to uninstall OpenClaw?
The official fastest path is openclaw uninstall --all --yes --non-interactive when the CLI still works.
Does uninstalling OpenClaw remove the CLI package too?
No. The uninstall guide says to remove the package-manager install separately with npm, pnpm, or Bun after the OpenClaw cleanup steps finish.
What should I do if the CLI is already missing?
Use the manual service-removal path in the official uninstall guide. That path covers launchd or systemd cleanup plus deleting the state directory manually.
Should I run a backup before uninstalling?
Yes, if you may want to restore the machine later. The official docs explicitly call out openclaw backup create before removing state or workspaces.
Go deeper
The operator playbooks
Production-ready PDF guides for OpenClaw and Hermes Agent — $19.99 each.




