No longer using OpenClaw? Or concerned about security and want to remove it cleanly? đ¤ Simply deleting the app or running npm uninstall is not enough. Because OpenClaw integrates deeply with your system using background services and long-lived external tokens, complete removal requires several important steps.
This guide covers OpenClaw v2026.4.x (latest as of 2026), providing command-line focused instructions to completely remove background services, configuration files, workspace data, and most importantly external OAuth tokens across macOS, Windows, and Linux. We've also included real issues and solutions reported by the community, so you can follow along with confidence.
~/.openclaw directory during uninstall will permanently remove your workspace data, conversation history, and settings. If you have important data, always run openclaw backup create first.
đ What's in This Guide
- Why is OpenClaw uninstall different from regular apps?
- đ Quick Uninstall: One command for basic cleanup
- đ macOS Complete Uninstall Step-by-Step
- đŞ Windows Complete Uninstall Step-by-Step
- đ§ Linux Complete Uninstall Step-by-Step
- đ OAuth Token Revocation (Most Critical Step!)
- â Complete Uninstall Verification Checklist
- đ§ FAQ & Troubleshooting
- đŹ Real User Community Feedback
1ď¸âŁ Why is OpenClaw Uninstall Different from Regular Apps? đ¤
OpenClaw is not just a desktop application. It's a locally-running autonomous agent platform that integrates deeply with your system.
đ Understanding OpenClaw's Architecture
| Component | Role | Uninstall Consideration |
|---|---|---|
openclaw CLI |
User command interface | Removable via npm uninstall -g |
Gateway Service |
Runs agents in background | Must deregister from LaunchAgent/systemd/schtasks |
~/.openclaw/state |
Session data, cache, job queue | Contains personal info, recommend full deletion |
~/.openclaw/workspaces |
User workspaces and projects | Data loss risk, backup required |
OAuth Tokens |
External service access (Google, Slack, etc.) | Independent of local deletion, must revoke separately |
openclaw gateway service may auto-restart after reboot. As long as this service runs in memory, account connections and data access permissions remain active.
đ Security Risks if Uninstall Fails
- Background processes continue running in memory
- OAuth tokens remain valid, allowing external service access
- API keys stored in config files could be exposed
- Legacy directories (
~/.clawdbot,~/.moltbot) remain as security vulnerabilities
Security researchers have documented cases where hundreds of exposed OpenClaw instances contained valid OAuth tokens and API keys. Simply "not using it anymore" without proper cleanup can pose serious security risks.
2ď¸âŁ đ Quick Uninstall: One Command for Basic Cleanup
The first method to try is OpenClaw's built-in official removal command. This command handles basic service cleanup and state file deletion automatically.
openclaw uninstall --all --yes --non-interactive
# Option explanations:
# --all : Remove service, state, workspaces, app
# --yes : Auto-accept confirmation prompts
# --non-interactive : Disable interactive input (for scripts)
# Safer approach (step-by-step confirmation):
openclaw uninstall --service --state --yes
â What This Command Handles
Removes service registration from macOS LaunchAgent, Linux systemd, or Windows Task Scheduler.
Removes session data, cache, and job queue from
~/.openclaw/state.
Deletes the
openclaw command from system PATH (if installed via npm).
openclaw backup create. You can restore later with openclaw backup restore.
â What This Command Does NOT Do (Important!)
- OAuth token revocation: External service permissions (Google, Slack, Discord, etc.) must be manually revoked
- Legacy directory cleanup: Previous version configs like ClawdBot (
~/.clawdbot) or MoltBot (~/.moltbot) may remain - npm global package removal: You may still need to run
npm uninstall -g openclawseparately - Custom config paths: Paths specified via
OPENCLAW_CONFIG_PATHenv var require manual deletion
Therefore, for truly complete removal, you must follow the additional platform-specific steps below.
3ď¸âŁ đ macOS Complete Uninstall Step-by-Step
On macOS, OpenClaw uses LaunchAgent to auto-start at login. Completely cleaning this up is the key.
đš Step 1: Force Stop Gateway Process
# 1. Try graceful shutdown (recommended)
openclaw gateway stop
# 2. Force kill if CLI already removed
pkill -f "openclaw gateway"
# 3. Verify no processes remain
ps aux | grep -i openclaw | grep -v grep
# No output = success
đš Step 2: Deregister LaunchAgent (Critical!)
LaunchAgent is a background job macOS loads automatically at login. Remove it completely with these commands:
# Unload service from current session
launchctl bootout gui/$UID/ai.openclaw.gateway
# Delete LaunchAgent plist file
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
# Also check legacy labels (ClawdBot/MoltBot)
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.plist
# Verify no LaunchAgents remain registered
launchctl list | grep -iE "openclaw|clawdbot|moltbot"
# Empty result = success
đš Step 3: Run Built-in Uninstaller
# Remove state files too
openclaw uninstall --state --yes
# Also delete workspaces (data loss warning!)
openclaw uninstall --workspace --yes
đš Step 4: Complete Hidden Config Directory Deletion
# Delete current and legacy config directories
rm -rf ~/.openclaw ~/.clawdbot ~/.moltbot ~/.molthub
# Also check XDG config paths (some install methods)
rm -rf ~/.config/openclaw ~/.local/share/openclaw 2>/dev/null
# Verify deletion
ls -la ~/.openclaw ~/.clawdbot 2>&1
# Should show "No such file or directory"
đš Step 5: Remove CLI Package
# If installed via npm
npm uninstall -g openclaw
# If installed via Homebrew
brew uninstall openclaw
# If using pnpm or bun
pnpm remove -g openclaw
bun remove -g openclaw
đš Step 6: Final Verification
# Check for running processes
ps aux | grep -i openclaw | grep -v grep
# Verify LaunchAgent deregistration
launchctl list | grep -iE "openclaw|clawdbot"
# Check if CLI command still exists
which openclaw
# Verify config directories are gone
ls ~/.openclaw 2>/dev/null; echo "Exit code: $?"
# All commands should return empty or error = complete removal
4ď¸âŁ đŞ Windows Complete Uninstall Step-by-Step
On Windows, OpenClaw registers background jobs via Task Scheduler. Note that some steps require administrator privileges.
đš Step 1: Stop Gateway Process
# Run PowerShell as Administrator
# 1. Graceful shutdown
openclaw gateway stop
# 2. Force kill (if CLI unavailable)
Stop-Process -Name "openclaw" -Force -ErrorAction SilentlyContinue
# 3. Verify no processes remain
Get-Process | Where-Object { $_.ProcessName -match "openclaw" }
# No output = success
đš Step 2: Remove Scheduled Tasks
# GUI method: Task Scheduler â Library â Search "OpenClaw" â Delete
# PowerShell method (requires Admin)
schtasks /Delete /TN "OpenClaw Gateway" /F
schtasks /Delete /TN "ClawdBot Gateway" /F 2>$null
schtasks /Delete /TN "MoltBot Gateway" /F 2>$null
# Verify no tasks remain
Get-ScheduledTask | Where-Object { $_.TaskName -match "openclaw|clawdbot" }
đš Step 3: Delete Config Directories
# Delete user profile config folders
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw"
Remove-Item -Recurse -Force "$env:USERPROFILE\.clawdbot"
Remove-Item -Recurse -Force "$env:USERPROFILE\.moltbot"
# Also check AppData configs
Remove-Item -Recurse -Force "$env:APPDATA\openclaw" 2>$null
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\openclaw" 2>$null
# Verify deletion
Test-Path "$env:USERPROFILE\.openclaw"
# Should return False
đš Step 4: Clean CLI and Environment Variables
# Remove npm global package
npm uninstall -g openclaw
# Verify openclaw removed from PATH
where openclaw
# Should show "INFO: Could not find files"
# Check and remove environment variables
echo $env:OPENCLAW_CONFIG_PATH
# If path outputs, manually delete that folder too
5ď¸âŁ đ§ Linux Complete Uninstall Step-by-Step
On Linux, systemd user services handle background execution. Focus on user-session-based cleanup rather than distro-specific differences.
đš Step 1: Stop Gateway Service
# Graceful shutdown
openclaw gateway stop
# Force kill if needed
pkill -f "openclaw gateway"
# Verify no processes remain
pgrep -a openclaw
# No output = success
đš Step 2: Remove systemd User Services
# Disable and stop service
systemctl --user disable --now openclaw-gateway.service
# Delete service unit file
rm -f ~/.config/systemd/user/openclaw-gateway.service
# Reload systemd daemon to apply changes
systemctl --user daemon-reload
# Also check legacy service names
systemctl --user disable --now clawdbot-gateway.service 2>/dev/null
rm -f ~/.config/systemd/user/clawdbot-gateway.service
systemctl --user daemon-reload
# Verify no services remain registered
systemctl --user list-units | grep -i openclaw
# Should show "0 loaded units listed" or no related items
đš Step 3: Clean Config Directories
# Delete base config directories
rm -rf ~/.openclaw ~/.clawdbot ~/.moltbot ~/.molthub
# Also check XDG standard paths
rm -rf ~/.config/openclaw ~/.local/share/openclaw 2>/dev/null
# Verify deletion
ls ~/.openclaw ~/.clawdbot 2>&1 | grep -v "No such file"
# No output = success
đš Step 4: Remove CLI via Package Manager
# npm (most common)
npm uninstall -g openclaw
# If using pnpm
pnpm remove -g openclaw
# If installed via distro package manager
# Debian/Ubuntu
sudo apt remove openclaw
# Fedora/RHEL
sudo dnf remove openclaw
# Arch
sudo pacman -R openclaw
6ď¸âŁ đ OAuth Token Revocation: The Most Critical Step! â ď¸
OpenClaw requests access permissions to various services to perform tasks. These permissions are issued as long-lived tokens that remain valid indefinitely unless explicitly revoked.
đš Google (Gmail, Calendar, Drive)
đš Slack
# 1. Visit workspace admin page
https://[your-workspace].slack.com/apps/manage
# 2. Search for "OpenClaw" or "ClawdBot"
# 3. Click app â "Remove App" â Confirm
# If you have admin privileges, remove from entire workspace:
# Settings & Administration â Manage Apps â OpenClaw â Remove
đš Discord
đš GitHub
# Check and revoke OAuth Apps
https://github.com/settings/applications
# 1. Click "Authorized OAuth Apps" tab
# 2. Find "OpenClaw" or "ClawdBot"
# 3. Click app â "Revoke access" â Confirm
# Also check GitHub Apps (some versions)
https://github.com/settings/installations
# Search and remove same app names
đš Microsoft (Outlook, OneDrive, Teams)
đš Notion
7ď¸âŁ â Complete Uninstall Verification Checklist
After completing all steps, run the checklist below to confirm everything is truly removed.
đ Platform-Specific Final Verification Commands
########## macOS / Linux ##########
# 1. Check for running processes
ps aux | grep -iE "openclaw|clawdbot|moltbot" | grep -v grep
# â Should return empty
# 2. Verify service deregistration
# macOS
launchctl list | grep -iE "openclaw|clawdbot"
# Linux
systemctl --user list-units | grep -i openclaw
# â Should return empty
# 3. Check if CLI command exists
which openclaw
# â Should return nothing
# 4. Verify config directories deleted
ls -d ~/.openclaw ~/.clawdbot ~/.moltbot ~/.molthub 2>&1
# â Should only show "No such file or directory"
# 5. Check environment variables
echo $OPENCLAW_CONFIG_PATH
# â If path outputs, manually delete that folder too
########## Windows (PowerShell) ##########
# 1. Running processes
Get-Process | Where-Object { $_.ProcessName -match "openclaw" }
# 2. Scheduled tasks
Get-ScheduledTask | Where-Object { $_.TaskName -match "openclaw|clawdbot" }
# 3. CLI command
where openclaw
# 4. Config folders
Test-Path "$env:USERPROFILE\.openclaw", "$env:USERPROFILE\.clawdbot"
# â All should return False
đ Final Verification Checklist
- â No background processes running on any platform
- â Services deregistered from LaunchAgent / systemd / Task Scheduler
- â
~/.openclawand legacy directories fully deleted - â
openclawCLI command removed from PATH - â OAuth tokens revoked from all external services (Google, Slack, Discord, etc.)
- â
Custom env vars like
OPENCLAW_CONFIG_PATHcleaned up
Your system is now clean of all OpenClaw traces. If needed, you can reinstall anytime with
npm install -g openclaw.
8ď¸âŁ đ§ FAQ & Troubleshooting
â Q: "openclaw uninstall command not found"
# Cause: CLI partially deleted already
# Solution 1: Reinstall via npm then remove
npm install -g openclaw
openclaw uninstall --all --yes
npm uninstall -g openclaw
# Solution 2: Manually clean services only
# macOS
pkill -f "openclaw gateway"
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null
# Linux
pkill -f "openclaw gateway"
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload
# Windows
Stop-Process -Name "openclaw" -Force
schtasks /Delete /TN "OpenClaw Gateway" /F
â Q: "Permission denied" errors after uninstall
# macOS / Linux: Check which process uses files
lsof | grep ~/.openclaw
# Kill the PID shown
kill -9 [PID]
# Fix permission issues (use cautiously)
sudo chown -R $USER:$USER ~/.openclaw 2>/dev/null
rm -rf ~/.openclaw
# Windows: Check which process uses files
handle.exe ~/.openclaw 2>$null
# Or use Task Manager â Details â End openclaw-related processes
â Q: I accidentally deleted my workspace data! Can I recover?
openclaw uninstall --workspace, recovery is generally not possible.
However, you can try these methods:
- If you had backups: Use
openclaw backup restore --from [backup-path] - Time Machine (macOS): Restore previous version of
~/.openclaw - File recovery tools: Try TestDisk, PhotoRec for deleted file recovery (low success rate)
- Cloud sync: If synced to Dropbox, Google Drive, etc., check web for previous versions
Going forward, always run
openclaw backup create before deleting important workspaces, or manage workspaces outside ~/.openclaw.
â Q: System is slow or showing errors after uninstall
OpenClaw removal itself shouldn't affect system performance, but residual configs from incomplete removal can cause issues.
# 1. Check shell profiles for related env vars
grep -n OPENCLAW ~/.bashrc ~/.zshrc ~/.bash_profile 2>/dev/null
# Edit and remove any output lines
# 2. Remove related paths from PATH
echo $PATH | tr ':' '\n' | grep -i openclaw
# 3. Reboot and verify normal operation
reboot
9ď¸âŁ đŹ Real User Community Feedback
Here are experiences and tips from actual users reporting OpenClaw uninstall issues on Reddit, GitHub Issues, and Discord.
"At first I thought just running `npm uninstall` was enough, but the background service kept running and I was confused. Following this guide to clean up LaunchAgent made it disappear completely. đ"
Reddit r/selfhosted, user @dev_minjun"I skipped the OAuth token revocation step and got a 'suspicious login' alert from Google days later. Always revoke tokens! This guide emphasizing that really saved me."
GitHub Discussions, user @security_first"On Windows, I struggled removing Task Scheduler entries because I didn't know Admin rights were needed. Don't forget to 'Run as Administrator' for PowerShell! đĄ"
Discord OpenClaw Community, user @win_user_2026đ Major Uninstall-Related Bugs from GitHub Issues
| Issue # | Problem | Status |
|---|---|---|
| #6289 | uninstall deletes workspaces causing data loss |
đĄ Under discussion (workspace deletion should require explicit --workspace flag) |
| #11237 | Gateway auto-reinstalls on reboot bug | â Fixed in v2026.3.15 |
| #35077 | Partial uninstall breaks config files, preventing reinstall | â ď¸ Requires manual cleanup (refer to this guide) |
| #13009 | Uninstall permission errors after auto-update | â Resolved by running as administrator |
đ Security Expert Advice
"Local agent tools like OpenClaw offer powerful capabilities, which means uninstall must be approached as 'permission revocation'. Not just file deletion, but a 3-step approach: system service deregistration + external token revocation + config cleanup is essential."
- Screenshot before uninstall: Capture settings screen and running processes for easier debugging if issues arise
- Log terminal commands: Use
script uninstall_log.txtto record command execution - Test in VM first: For critical systems, verify uninstall steps in a virtual machine first
- Share checklists: Standardize uninstall procedures within teams to prevent mistakes
đŻ Conclusion: Safe Uninstall, Responsible Usage
OpenClaw is a powerful locally-running autonomous agent platform. That's exactly why uninstall requires more caution than install. We hope this guide helped you safely clean up your system.
- Stop background service with
openclaw gateway stop - Deregister platform-specific services (LaunchAgent/systemd/schtasks)
- Delete
~/.openclawand legacy directories - Remove CLI via npm or other package manager
- Most critical: Revoke OAuth tokens from all external services (Google, Slack, Discord, etc.)
- Final verification with checklist commands
If you decide to use OpenClaw again in the future, refer to the OpenClaw Complete Setup Guide to start safely. đŚâ¨
This guide was written based on OpenClaw v2026.4.x as of April 2026. Changes in newer versions may exist, so please also refer to the official documentation at docs.openclaw.ai.