Skip to content

How to completely uninstall OpenClaw

We have all been there. You try out a new tool, decide it doesn’t fit your current workflow, and then realize it left behind a background service or hidden config files that keep running. It is frustrating when a “quick test” leaves your system cluttered. I want to help you clean up OpenClaw properly so your environment stays exactly how you want it.

  • Access to the terminal or command line where OpenClaw is installed.
  • Permissions to manage services (launchd on macOS, systemd on Linux, or Scheduled Tasks on Windows).
  • Knowledge of how you installed it (npm, pnpm, bun, or source checkout).

If you still have the CLI installed, the fastest way to remove everything is the built-in command. I recommend this path because it handles the service cleanup for you.

Run this command:

Terminal window
openclaw uninstall

If you are automating this or using npx, use the non-interactive flags:

Terminal window
openclaw uninstall --all --yes --non-interactive
npx -y openclaw uninstall --all --yes --non-interactive

If you prefer to do things manually or if the CLI is already gone, follow these steps in order.

First, stop the background service and remove it from your system’s service manager.

Terminal window
openclaw gateway stop
openclaw gateway uninstall

OpenClaw stores data in a state directory. By default, this is at ~/.openclaw.

Terminal window
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"

If you set a custom OPENCLAW_CONFIG_PATH outside that folder, delete that file as well. If you used profiles, remember to repeat this for each directory (like ~/.openclaw-<profile>).

You can optionally remove your agent files and the macOS application if you installed it.

Terminal window
# Delete workspace
rm -rf ~/.openclaw/workspace
# Remove macOS app (if applicable)
rm -rf /Applications/OpenClaw.app

Finally, uninstall the package using the tool you used to install it.

Terminal window
npm rm -g openclaw
# OR
pnpm remove -g openclaw
# OR
bun remove -g openclaw

If the gateway service is still running but you already deleted the openclaw command, you need to use platform-specific tools to kill it.

The default label is bot.molt.gateway.

Terminal window
launchctl bootout gui/$UID/bot.molt.gateway
rm -f ~/Library/LaunchAgents/bot.molt.gateway.plist

OpenClaw usually runs as a user unit.

Terminal window
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload

The task is named OpenClaw Gateway.

Terminal window
schtasks /Delete /F /TN "OpenClaw Gateway"
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd"

The gateway service keeps running even after I deleted the files. This happens if the service manager (like systemd or launchd) still has the service registered in memory. Follow the “Manual Service Removal” steps above for your specific operating system to stop the process and remove the registration.

I installed from a source checkout (git clone) and things are stuck. If you are running from a repo, you must uninstall the gateway service using the CLI before you delete the repo directory. If you already deleted the repo, use the Manual Service Removal steps to clean up the background processes.

If you run into other issues, you can always ask the AI Setup Assistant for help.

OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.