#Delete openclaw
1 messages · Page 1 of 1 (latest)
If you want the full nuke, this is the clean path:
openclaw uninstall --all --yes --non-interactive
That removes the gateway service, state/config, workspace, and macOS app if present, but it does not remove the CLI package itself.
Then also remove the CLI install:
pnpm remove -g openclaw
# or, if you installed with npm:
npm rm -g openclaw
If you ran OpenClaw from a git clone/source checkout, delete that repo folder too.
A few gotchas:
- Default state dir is
~/.openclaw - If you used profiles, also remove
~/.openclaw-<profile> - If you set a custom
OPENCLAW_CONFIG_PATH, delete that file too - If you used remote mode, do the cleanup on the gateway host
If openclaw is already gone but the service is still running, use the manual uninstall steps here:
If you want, tell me your OS and how you installed it, and I’ll give you the exact one-shot commands.
â—‡ Gateway service installed.
Health check failed: gateway closed (1008): unauthorized: gateway token mismatch (provide gateway auth token)
That error is token drift, not “can’t uninstall”.
It means the running gateway has a different auth token than the client is using. For deleting OpenClaw, you can usually ignore that and just uninstall directly:
openclaw uninstall --all --yes --non-interactive
pnpm remove -g openclaw
# or, if you installed with npm:
npm rm -g openclaw
If that still leaves the service behind, remove it manually.
Linux
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload
rm -rf ~/.openclaw ~/.openclaw-*
macOS
launchctl bootout gui/$UID/ai.openclaw.gateway
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
rm -rf ~/.openclaw ~/.openclaw-* /Applications/OpenClaw.app
If you cloned the repo and ran from source, delete that repo folder too.
Docs:
If you want, paste:
openclaw --version
uname -a
and I’ll give you the exact commands for your machine.
missing gateway token and how fix
If the error is “missing gateway token” / “provide gateway auth token”, it usually means:
- the gateway is in token auth mode, and
- your client / Control UI did not send the token.
Try this:
openclaw --version
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.token
If gateway.auth.token is empty
Generate one, then restart:
openclaw config set gateway.auth.mode token
openclaw doctor --generate-gateway-token
openclaw gateway restart
If a token exists
Use that exact token in the client / Control UI.
For the dashboard, the auth box is in:
Control → Overview → Gateway Access
Paste it into Gateway Token, then connect.
If it says token mismatch
That means the client has an old/stale token. Re-copy the current one:
openclaw config get gateway.auth.token
If you’re on macOS and it keeps using an old token, also check for old launchctl env overrides:
launchctl getenv OPENCLAW_GATEWAY_TOKEN
launchctl unsetenv OPENCLAW_GATEWAY_TOKEN
launchctl unsetenv OPENCLAW_GATEWAY_PASSWORD
openclaw gateway restart
Docs:
If you paste the output of:
openclaw --version
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.token
I can tell you the exact next step.
openclaw --version
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.token
OpenClaw 2026.4.15 (041266a)
Config (/Users/ryanclone/.openclaw/openclaw.json): missing env var "OPENCLAW_GATEWAY_TOKEN" at gateway.auth.token - feature using this value will be unavailable
Config (/Users/ryanclone/.openclaw/openclaw.json): missing env var "TELEGRAM_BOT_TOKEN" at channels.telegram.botToken - feature using this value will be unavailable
🦞 OpenClaw 2026.4.15 (041266a)
More integrations than your therapist's intake form.
token
Config (/Users/ryanclone/.openclaw/openclaw.json): missing env var "OPENCLAW_GATEWAY_TOKEN" at gateway.auth.token - feature using this value will be unavailable
Config (/Users/ryanclone/.openclaw/openclaw.json): missing env var "TELEGRAM_BOT_TOKEN" at channels.telegram.botToken - feature using this value will be unavailable
Yep, run those, but do not paste the token value here. That third command prints a secret.
Please paste only:
openclaw --version
openclaw config get gateway.auth.mode
For this one:
openclaw config get gateway.auth.token
just tell me one of these:
it prints a token
it’s blankit errors
If your goal is still just to remove OpenClaw, you can skip token debugging and run:
openclaw uninstall --all --yes --non-interactive
Then remove the CLI too:
pnpm remove -g openclaw
# or npm rm -g openclaw
Nice, that explains it.
Your config is set to:
gateway.auth.mode = tokengateway.auth.token = env(OPENCLAW_GATEWAY_TOKEN)
…but that env var is not set, so the gateway has no token to use.
Also, the TELEGRAM_BOT_TOKEN warning is separate and unrelated.
If you only want to delete OpenClaw
You do not need to fix the token first. Just run:
openclaw uninstall --all --yes --non-interactive
pnpm remove -g openclaw
# or npm rm -g openclaw
If you want to fix the gateway token
Easiest fix, store a real token in config
openclaw config set gateway.auth.mode token
openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
openclaw gateway restart
Then use that token in the Control UI.