cmd, press Enter; or search for PowerShell.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-interactiveThis handles the gateway stop, service uninstall, and state/config deletion in one step.
After 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 openclawVerify it is gone:
which openclaw # macOS/Linux — should return nothing
where.exe openclaw # Windows — should return nothingIf you want explicit control instead of openclaw uninstall --all:
openclaw gateway stop
openclaw gateway uninstallThen delete state and config:
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
rm -rf ~/.openclaw/workspaceOn Windows (PowerShell):
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw"Check whether OpenClaw added entries to your shell config:
~/.zshrc, ~/.zprofile (macOS)~/.bashrc, ~/.bash_profile, ~/.profile (Linux)$PROFILE (Windows)Remove any:
OPENCLAW_* environment variablessource lines referencing OpenClaw scriptsopenclaw commandIf you ran OpenClaw from a repo checkout instead of a global npm install:
Run the following to confirm nothing remains:
macOS/Linux:
which openclaw
npm ls -g openclaw
ls ~/.openclaw 2>/dev/nullWindows (PowerShell):
where.exe openclaw
npm ls -g openclaw
Test-Path "$env:USERPROFILE\.openclaw"All should return empty or "not found."
--profile or OPENCLAW_PROFILE, repeat state deletion for each profile directory (e.g. ~/.openclaw-<profile>).OPENCLAW_CONFIG_PATH to a location outside the state dir, delete that file too.