OpenClaw does not behave like a normal app. Deleting the folder or removing the CLI leaves the background gateway service running. That service restarts automatically after every reboot.

A full removal needs four steps:
- Stop the gateway service
- Delete the CLI
- Clear the state directories
- Revoke any OAuth tokens the app used to connect to your accounts
This guide walks through the complete uninstall process for every platform, plus the manual steps you need when the CLI is already gone.
What OpenClaw Installs on Your System
OpenClaw installs three components together, and each one needs separate cleanup.
The gateway service runs as a background process. It uses launchd on macOS, systemd on Linux, and a Scheduled Task on Windows. This process starts automatically at login and keeps running even after you delete the app.
The CLI tool gets installed globally through npm, pnpm, bun, or a standalone installer. Removing the background service does not remove this tool.
State directories hold your configuration files, conversation history, cached data, and any OAuth tokens the app stored locally. These live in hidden folders like ~/.openclaw on macOS and Linux, or %APPDATA%\openclaw on Windows.
If you connected OpenClaw to Gmail, Slack, Discord, GitHub, or Notion, those services also hold long-lived OAuth tokens on their own servers. Local cleanup does not touch those tokens, so you need to revoke them separately in each service’s security settings.
Easy Path: Uninstall With the CLI Still Installed
If the openclaw command still works, this is the fastest route.
Run the built-in uninstaller:
openclaw uninstallThis removes the gateway service registration and clears state data, but keeps your workspace directories unless you add the --workspace flag.
Preview what the uninstaller will touch before running it:
openclaw uninstall --dry-run --allFor scripted or unattended removal, use:
openclaw uninstall --all --yes --non-interactiveThe --all flag combines four separate scopes: --service, --state, --workspace, and --app. You can pass any of these individually if you only want to remove part of the installation.
After the uninstaller finishes, remove the CLI package itself:
npm rm -g openclawSubstitute pnpm remove -g openclaw or bun remove -g openclaw depending on how you installed it.
If you installed the macOS native app, delete the app bundle too:
rm -rf /Applications/OpenClaw.appWhat the Built-in Uninstaller Skips
The one-command uninstall handles the gateway, state directory, and CLI. It leaves a few things behind:
- It does not revoke OAuth tokens on connected services.
- It does not clean up leftover folders from earlier versions of the project. OpenClaw was previously called ClawdBot and then MoltBot before it was renamed.
- It skips any custom config file path you set through the
OPENCLAW_CONFIG_PATHenvironment variable. Delete that file yourself if you used it.
If you set up named profiles using --profile or OPENCLAW_PROFILE, each profile has its own state folder. These default to ~/.openclaw-<profile>. Repeat the state directory cleanup separately for each one.
Manual Service Removal When the CLI Is Missing (macOS, Linux and Windows)
If the CLI is already deleted or corrupted but the gateway keeps running, remove the service directly for your platform.
Uninstall OpenClaw on macOS
Stop and unload the LaunchAgent, then delete its plist file:
launchctl bootout gui/$UID/ai.openclaw.gateway
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plistOlder installations may use legacy labels from before the OpenClaw rebrand. Check for and remove those too:
launchctl bootout gui/$UID/com.openclaw.gateway 2>/dev/null
launchctl bootout gui/$UID/com.clawdbot.gateway 2>/dev/null
rm -f ~/Library/LaunchAgents/com.openclaw.gateway.plist
rm -f ~/Library/LaunchAgents/com.clawdbot.gateway.plistSome setups may also register under bot.molt.gateway. If the plist exists, remove it the same way.
Sometimes the automated uninstaller cannot find the service at all. This usually means the service was set up for the whole system instead of just your user account. In that case, it lives in a different folder: /Library/LaunchDaemons/ instead of ~/Library/LaunchAgents/.
The CLI’s built-in commands only check the user folder, so they miss this. To remove a system-wide service, run the same two commands as above, but add sudo before each one and point them to the system folder instead.
Uninstall OpenClaw on Linux
Disable and stop the user service, then remove its unit file:
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reloadMachines upgraded from very old installs may still have a unit named clawdbot-gateway.service left over from before the rename. Check for it and remove it the same way if it exists.
If OpenClaw was installed system-wide rather than as a user service, use sudo systemctl instead and remove the unit from /etc/systemd/system/ rather than the user config directory.
Uninstall OpenClaw on Windows
On Windows, the gateway runs through a Scheduled Task named “OpenClaw Gateway.” This task starts a small script in the background each time you log in. You need to remove three things: the task itself and its two script files.
- Delete the scheduled task:
schtasks /Delete /F /TN "OpenClaw Gateway"- Delete the two script files:
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd" -ErrorAction SilentlyContinue
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.vbs" -ErrorAction SilentlyContinueIf you used a named profile, the task name changes to “OpenClaw Gateway (<profile>).” The script files also move to a different folder: ~\.openclaw-<profile> instead of the default one.
You can also stop the task using the Windows Task Scheduler app instead of the command line. Here is how:
- Open Task Scheduler and find the “OpenClaw Gateway” task.
- Right-click it and select Disable.
- Right-click it again and select Delete.
Deleting State, Config, and Workspace Data
Once the service is stopped on any platform, clear the remaining directories.
Remove the primary state directory:
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"As mentioned earlier, OpenClaw used to be called ClawdBot and then MoltBot. If you installed it a while back, you may have data left in those old folders too. Clear all of them:
rm -rf ~/.openclaw ~/.clawdbot ~/.moltbot ~/.molthubIf you want to preserve a workspace stored inside the state directory, such as ~/.openclaw/workspace, move it somewhere else before running the command above.
On Windows, the equivalent directories sit under %APPDATA%\openclaw and %LOCALAPPDATA%\openclaw:
Remove-Item -Recurse -Force $env:APPDATA\openclaw
Remove-Item -Recurse -Force $env:LOCALAPPDATA\openclawIf this doesn’t apply to you, skip these two notes.
If you had set OPENCLAW_CONFIG_PATH to a custom location, none of the cleanup commands above will touch that file. Delete it yourself.
If you ran OpenClaw in remote gateway mode, the state directory lives on the remote gateway machine, not on your own computer. Run the same cleanup steps on that machine too.
Removing Docker Installations
If you ran OpenClaw through Docker, the cleanup targets containers, images, and volumes instead of files on disk.
List anything related to OpenClaw first:
docker ps -a | grep openclaw
docker images | grep openclawThen remove each piece:
docker rm $(docker ps -a -q --filter ancestor=openclaw)
docker rmi openclaw
docker volume pruneBe careful with docker volume prune. It removes all unused volumes on your system, not just the ones from OpenClaw. Before you run it, check if you have other unused Docker volumes you still want to keep. If you do, back them up first or skip this command.
Revoking OAuth Tokens and API Keys
Local file removal does not cancel access tokens stored on external servers. If OpenClaw connected to Gmail, Google Calendar, Slack, Discord, GitHub, Microsoft, or Notion, those services keep the authorization active until you revoke it manually.
Open the security or connected-apps settings for each service OpenClaw had access to and remove the OpenClaw authorization from there. Also rotate any API keys you gave OpenClaw for LLM providers such as OpenAI or Anthropic, since a leaked or lingering key can still be used even after the app itself is gone.
Verifying the Uninstall Worked
Run these checks after finishing the steps above.
Confirm the CLI is gone:
which openclawA result of “command not found” confirms removal.
Confirm no gateway process is still running:
ps aux | grep openclawConfirm the config directory is gone:
ls ~/.openclaw“No such file or directory” means the removal succeeded. On macOS, also run launchctl list | grep openclaw to confirm no service is still registered. On Linux, run systemctl --user status openclaw-gateway.service and confirm it reports the unit as not found. On Windows, search Task Scheduler for any task with “OpenClaw” in the name.
If you plan to reinstall later, the official OpenClaw documentation covers the current setup steps for every platform.
Frequently Asked Questions
Does uninstalling OpenClaw delete my agent configurations?
Yes. Removing the state directory deletes agent configurations, conversation history, and custom setups. Back up the configuration folder first if you want to keep any of that data.
Why does the gateway keep running after I remove the CLI?
The gateway runs as a separate system service from the CLI. Deleting the CLI binary does not stop or unregister the service, so you need to remove it manually through launchctl, systemctl, or Task Scheduler depending on your platform.
Do I need to do anything special if I installed through Docker?
Yes. Docker installations need their containers, images, and volumes removed separately, since none of the CLI uninstall commands touch Docker resources.
Can I reinstall OpenClaw later after a full removal?
Yes. A clean removal actually makes reinstalling easier, since leftover config files or a still-registered service can cause conflicts with a fresh install.
What if I switched from an npm install to the native macOS app, or the other way around?
Uninstall the original method fully before installing the other one. Running both installation types at once can cause the gateway service to conflict with itself.
Related OpenClaw Guides
- How to Fix OpenClaw Not Discoverable on Path After Installation
- OpenClaw Patch Fixes One-Click RCE Bug Exploited Through Malicious Links
- How to Install OpenClaw on Windows Using WSL2 (Official Local Setup Guide)
Windows & WSL
