Open your terminal emulator of choice, or press Ctrl + Alt + T on most desktop environments.
If the openclaw command still works, run:
openclaw uninstall --all --yesuninstall — tells the program you want to remove it.--all — removes everything: gateway service, local database, config files.--yes — auto-confirms all prompts.For fully non-interactive use (scripts, CI, npx):
openclaw uninstall --all --yes --non-interactive
npx -y openclaw uninstall --all --yes --non-interactiveAfter the uninstall command finishes, only the CLI shell remains. Remove it with whichever package manager you originally used:
npm rm -g openclaw
# or
pnpm remove -g openclaw
# or
bun remove -g openclawIf the openclaw command is missing but the gateway service is still running:
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reloadIf you used profiles, the unit name is openclaw-gateway-<profile>.service — adjust accordingly.
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
rm -rf ~/.openclaw/workspaceIf you set OPENCLAW_CONFIG_PATH to a custom location outside the state directory, delete that file too. If you used profiles, repeat for each state dir (e.g. ~/.openclaw-<profile>).
| Category | Places to check |
|---|---|
| Config | ~/.config/openclaw |
| Local share/state | ~/.local/share/openclaw, ~/.local/state/openclaw |
| Cache | ~/.cache/openclaw |
| Project folders | Repo or workspace folders tied to your setup |
| Shell config | ~/.bashrc, ~/.zshrc, ~/.profile |
Linux users should explicitly verify these are clean:
systemctl --user list-units | grep openclawsystemctl list-units | grep openclawcrontab -l | grep openclawIf something keeps restarting after uninstall, service cleanup is usually incomplete.
Review and clean up:
~/.bashrc~/.zshrc~/.profile~/.bash_profileRemove any OPENCLAW_* environment variables, PATH entries, or source lines that reference OpenClaw.
which openclaw
ps aux | grep openclaw
systemctl --user list-units | grep openclawAll three should return empty results.