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.
What You’ll Need
Section titled “What You’ll Need”- 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).
Quick Start
Section titled “Quick Start”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:
openclaw uninstallIf you are automating this or using npx, use the non-interactive flags:
openclaw uninstall --all --yes --non-interactivenpx -y openclaw uninstall --all --yes --non-interactiveManual Cleanup Steps
Section titled “Manual Cleanup Steps”If you prefer to do things manually or if the CLI is already gone, follow these steps in order.
1. Stop and Uninstall the Gateway
Section titled “1. Stop and Uninstall the Gateway”First, stop the background service and remove it from your system’s service manager.
openclaw gateway stopopenclaw gateway uninstall2. Delete State and Config Files
Section titled “2. Delete State and Config Files”OpenClaw stores data in a state directory. By default, this is at ~/.openclaw.
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>).
3. Remove the Workspace and App
Section titled “3. Remove the Workspace and App”You can optionally remove your agent files and the macOS application if you installed it.
# Delete workspacerm -rf ~/.openclaw/workspace
# Remove macOS app (if applicable)rm -rf /Applications/OpenClaw.app4. Remove the CLI
Section titled “4. Remove the CLI”Finally, uninstall the package using the tool you used to install it.
npm rm -g openclaw# ORpnpm remove -g openclaw# ORbun remove -g openclawManual Service Removal (CLI Missing)
Section titled “Manual Service Removal (CLI Missing)”If the gateway service is still running but you already deleted the openclaw command, you need to use platform-specific tools to kill it.
macOS (launchd)
Section titled “macOS (launchd)”The default label is bot.molt.gateway.
launchctl bootout gui/$UID/bot.molt.gatewayrm -f ~/Library/LaunchAgents/bot.molt.gateway.plistLinux (systemd)
Section titled “Linux (systemd)”OpenClaw usually runs as a user unit.
systemctl --user disable --now openclaw-gateway.servicerm -f ~/.config/systemd/user/openclaw-gateway.servicesystemctl --user daemon-reloadWindows (Scheduled Task)
Section titled “Windows (Scheduled Task)”The task is named OpenClaw Gateway.
schtasks /Delete /F /TN "OpenClaw Gateway"Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd"Troubleshooting
Section titled “Troubleshooting”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.
What’s Next
Section titled “What’s Next”- Installation Guide - If you want to start fresh.
- CLI Reference - To see all available commands.
OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.