How to Completely Uninstall OpenClaw on All Platforms

Paper Engineer Apr 08, 2026 AI (Artificial intelligence)

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_PATH to 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.gateway
  • bot.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.service
  • openclaw-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 Gateway
  • OpenClaw 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:

  1. Uninstall the gateway service first (use Easy Path or Manual Service Removal above)
  2. Delete the repo directory
  3. 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 --profile or the OPENCLAW_PROFILE environment 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.

Back to Articles

Comments

Loading...