How to Completely Uninstall OpenClaw on All Platforms
OpenClaw is a powerful AI coding assistant, but sometimes you need a clean slate β whether you're troubleshooting, switching tools, or doing a fresh reinstall. This guide covers every method to completely remove OpenClaw from macOS, Linux, and Windows.
π Easy Path β Using the CLI
Use this section if the openclaw command still works on your system.
β Recommended: Built-in Uninstaller
The simplest way to remove everything:
openclaw uninstall
This will interactively walk you through removing the gateway service, state files, and configuration.
π€ Non-Interactive Mode (Automation / CI)
For scripts, CI pipelines, or npx one-liners:
openclaw uninstall --all --yes --non-interactive
Or run directly via npx without a global install:
npx -y openclaw uninstall --all --yes --non-interactive
π§ Manual Steps (Step-by-Step)
Use this approach if you want full control or need to debug what's left behind.
Step 1 β Stop the Gateway Service
openclaw gateway stop
Step 2 β Uninstall the Gateway Service
This removes the service from launchd (macOS), systemd (Linux), or schtasks (Windows):
openclaw gateway uninstall
Step 3 β Delete State and Config Files
macOS / Linux:
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
Windows (PowerShell):
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw"
π‘ If you set
OPENCLAW_CONFIG_PATHto a custom location outside the state directory, delete that file manually as well.
Step 4 β Delete Workspace (Optional)
This removes agent-generated workspace files:
rm -rf ~/.openclaw/workspace
Step 5 β Remove the CLI
Choose the command matching the package manager you used to install OpenClaw:
# npm
npm rm -g openclaw
# pnpm
pnpm remove -g openclaw
# bun
bun remove -g openclaw
Step 6 β Remove macOS App (if installed)
rm -rf /Applications/OpenClaw.app
β οΈ Manual Service Removal (No CLI Available)
Use this section if OpenClaw services are still running but the openclaw command is no longer available.
π macOS (launchd)
Default service labels:
bot.molt.gatewaybot.molt.<profile>(if using profiles)com.openclaw.*(legacy)
# Stop and remove the service
launchctl bootout gui/$UID/bot.molt.gateway
rm -f ~/Library/LaunchAgents/bot.molt.gateway.plist
If you used profiles, replace gateway with your <profile> name. Also remove any legacy com.openclaw.*.plist files if present.
π§ Linux (systemd)
Default unit names:
openclaw-gateway.serviceopenclaw-gateway-<profile>.service
# Disable, stop, and remove the service
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload
πͺ Windows (Scheduled Task)
Default task names:
OpenClaw GatewayOpenClaw Gateway (<profile>)
schtasks /Delete /F /TN "OpenClaw Gateway"
PowerShell cleanup:
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd"
If you used profiles:
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw-<profile>"
ποΈ Removing the CLI Binary
Normal Install (install.sh / npm / pnpm / bun)
If you installed via https://openclaw.bot/install.sh, install.ps1, or a package manager:
# npm
npm rm -g openclaw
# pnpm
pnpm remove -g openclaw
# bun
bun remove -g openclaw
Source Checkout (git clone)
If you ran OpenClaw from a repo checkout:
- Uninstall the gateway service first (use Easy Path or Manual Service Removal above)
- Delete the repo directory
- Delete state + workspace:
rm -rf ~/.openclaw ~/.openclaw/workspace
β Post-Uninstall Verification
After uninstalling, confirm nothing is still running:
macOS / Linux
# Check for running processes
ps aux | grep openclaw
# Check launchd services (macOS)
launchctl list | grep molt
# Check systemd services (Linux)
systemctl --user list-units | grep openclaw
Windows (PowerShell)
# Check for running processes
Get-Process -Name "*openclaw*" -ErrorAction SilentlyContinue
# Check scheduled tasks
Get-ScheduledTask | Where-Object { $_.TaskName -like "*OpenClaw*" }
If anything still shows up, you may have missed a service or a profile. Revisit the manual removal steps above.
π Important Notes
- Profiles: If you used
--profileor theOPENCLAW_PROFILEenvironment variable, repeat the state deletion for each profile:rm -rf ~/.openclaw-<profile> - Remote Mode: In remote mode, the state directory lives on the gateway host β you need to run the cleanup steps on that host as well.
- Environment Variables: Consider removing any OpenClaw-related entries from your shell profile (
~/.bashrc,~/.zshrc, or PowerShell$PROFILE).
π Source: This article is based on the original uninstall guide by @bewithdhanu β OpenClaw Complete Uninstall Guide (All Platforms) on GitHub Gist. Credit goes to the original author.
Comments
Please login to post a comment.