Menu

OpenClaw Complete Uninstall Guide: Clean Removal with Commands - Latest Method 🔧

OpenClaw Complete Uninstall Guide - terminal window showing clean removal commands on macOS, Windows, and Linux

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.

⚠️ Critical: Backup Before Proceeding Deleting the ~/.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.

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
❗ Core Issue: Background Services Even if you trash the app or remove only the CLI, the 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

1
Stop and deregister Gateway service
Removes service registration from macOS LaunchAgent, Linux systemd, or Windows Task Scheduler.
2
Delete state directory
Removes session data, cache, and job queue from ~/.openclaw/state.
3
Remove CLI binary from PATH
Deletes the openclaw command from system PATH (if installed via npm).
💡 Pro Tip: Backup First! Before deleting, if you have important workspaces, create a snapshot with 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 openclaw separately
  • Custom config paths: Paths specified via OPENCLAW_CONFIG_PATH env 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.

macOS Windows Linux

🔹 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
⚠️ Check Windows Defender Exclusions Some users added OpenClaw to Windows Defender exclusions during install. After uninstall, verify Security Settings → Virus & threat protection → Manage settings → Exclusions doesn't still contain related paths.

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! ⚠️

❗ Skipping this step makes uninstall meaningless Even after deleting all local files, OAuth tokens stored on external service servers remain valid. Anyone with these tokens can still access your accounts (email, calendar, files, etc.).

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)

2
Find "OpenClaw", "ClawdBot", or "MoltBot" in third-party apps list
3
Click app → "Remove Access" → Confirm
4
If using multiple accounts, repeat for each account

🔹 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

1
Discord App → Settings (gear icon) → "Authorized Apps"
2
Find "OpenClaw", "Clawd", or "ClawdBot"
3
Click "Deauthorize"

🔹 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)

2
Find "OpenClaw" or "ClawdBot" in apps with permissions
3
Click "Edit" next to app → "Remove these permissions" → Confirm

🔹 Notion

1
Notion App → Settings & Members → "My Connections"
2
Find "OpenClaw" or "ClawdBot"
3
Three-dot menu (⋮) → "Disconnect"
✅ Verification Method If "OpenClaw" or related app names no longer appear in each service's app list, token revocation is complete.

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
  • ✅ ~/.openclaw and legacy directories fully deleted
  • ✅ openclaw CLI command removed from PATH
  • ✅ OAuth tokens revoked from all external services (Google, Slack, Discord, etc.)
  • ✅ Custom env vars like OPENCLAW_CONFIG_PATH cleaned up
🎉 All items checked? Complete uninstall finished!
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

Cause: Files may be in use by another process, or permission issues.
# 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?

Answer: If deleted via 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
⚠️ Prevention is best
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."
— OX Security Research Team
💡 Community Tips Collection
  • Screenshot before uninstall: Capture settings screen and running processes for easier debugging if issues arise
  • Log terminal commands: Use script uninstall_log.txt to 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.

✅ Complete Uninstall Summary
  1. Stop background service with openclaw gateway stop
  2. Deregister platform-specific services (LaunchAgent/systemd/schtasks)
  3. Delete ~/.openclaw and legacy directories
  4. Remove CLI via npm or other package manager
  5. Most critical: Revoke OAuth tokens from all external services (Google, Slack, Discord, etc.)
  6. 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.

Share:
Search Share