Back

How to Uninstall Clawbot / OpenClaw: A Complete Step-by-Step Guide for macOS, Linux, and Windows

How to Uninstall Clawbot / OpenClaw: A Complete Step-by-Step Guide for macOS, Linux, and Windows

Uninstalling OpenClaw is more involved than simply removing a binary. It installs a persistent background gateway service, creates configuration and state directories, and may run multiple instances if you use profiles. If you installed via Node package managers (npm, pnpm, bun) or as a native app, you need to remove services, data, and CLI tools

The process might seem tricky, but no worries: this guide leaves nothing behind on your system. Follow the steps carefully, and let’s start!

What OpenClaw Installs

Before uninstalling, try to understand what components may be present:

  • CLI tool (openclaw) installed globally via npm/pnpm/bun

  • Gateway service that runs automatically (LaunchAgent, systemd, Scheduled Task)

  • State & config directories (default: ~/.openclaw or profile variants)

  • Workspace directories with agent files

  • Possible macOS app bundle (OpenClaw.app)

  • Optional Docker containers/volumes if run via Docker

Most partial uninstalls (e.g., removing just the CLI) leave services and state behind.

Choose Your Uninstall Path

Option A — Recommended: CLI Still Installed

Use the built-in uninstaller if you still have the openclaw command:

openclaw uninstall

This stops and removes the gateway service and state.

If you need full removal without prompts (CI, scripts):

openclaw uninstall –all –yes –non-interactive

npx -y openclaw uninstall –all –yes –non-interactive

That is the cleanest uninstall method because it leverages the officially supported command. 


Option B — Manual: CLI Missing or Service Still Running

Use this if:

  • openclaw no longer works (e.g., removed CLI first)

  • Gateway service still runs after CLI removal

  • You want complete control over every component

Manual steps are below, broken down by platform.


Step 1: Stop and Remove the Background Service


Now we start! Follow the steps carefully and keep referring to the instructions for your system only (macOS, Linux, or Windows).

macOS (LaunchAgent)

Default service label:

ai.openclaw.gateway

Stop it and unload it:

launchctl bootout gui/$UID/ai.openclaw.gateway

Remove the service file:

rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist

If you used custom profiles with –profile, replace the label and plist accordingly (e.g., ai.openclaw.<profile>).

Linux (systemd, per-user service)

Default service unit:

openclaw-gateway.service

Disable and remove:

systemctl –user disable –now openclaw-gateway.service

Delete the service file and reload:

rm -f ~/.config/systemd/user/openclaw-gateway.service

systemctl –user daemon-reload

If you have profile units like openclaw-gateway-<profile>.service, remove those too.


Windows (Scheduled Task)

Default task name:

OpenClaw Gateway

Delete it:

schtasks /Delete /F /TN “OpenClaw Gateway”

And remove the associated script:

Remove-Item -Force “$env:USERPROFILE\.openclaw\gateway.cmd”

If you used profiles, apply the same commands to the profile names. (OpenClaw)

Step 2: Remove State and Configure Directories

OpenClaw stores its state and configuration in your home directory by default:

${OPENCLAW_STATE_DIR:-$HOME/.openclaw}

Delete it:

rm -rf “${OPENCLAW_STATE_DIR:-$HOME/.openclaw}”

If you set a custom config path with OPENCLAW_CONFIG_PATH:

rm -f “$OPENCLAW_CONFIG_PATH”

If you used named profiles, remove each profile directory:

rm -rf ~/.openclaw-*

Repeat for each active profile.

Step 3: Remove the CLI Tool

Depending on how you installed the CLI:

npm rm -g openclaw

pnpm remove -g openclaw

bun remove -g openclaw

This removes the global CLI binary and related executables.

Step 4: Remove the macOS App (Optional)

If you installed the native macOS bundle:

rm -rf /Applications/OpenClaw.app

This step is optional because the app bundle is separate from the CLI and service.

Step 5: Docker Cleanup (Optional)

If you deployed OpenClaw via Docker/Docker Compose, stop containers and remove images/volumes:

docker compose down –volumes –remove-orphans

docker rmi openclaw/openclaw:latest

docker volume prune -f

This ensures all container states and images are cleaned up.

Final Verification Checklist

You are almost done! After running the uninstall steps, verify the cleanup:

1. CLI Gone

openclaw –version

Should return command not found.

2. No Running Services

macOS:

launchctl list | grep -i openclaw

Linux:

systemctl –user status openclaw-gateway.service

Windows:

schtasks /Query /TN “OpenClaw Gateway”

If none return results, the service is gone.

3. No Remaining Data

ls ~/.openclaw ~/.openclaw-*

Should produce “No such file or directory”. Remove any leftover profile directories manually as needed.

Edge Cases & Best Practices

Profiles

If you used the –profile option or OPENCLAW_PROFILE, OpenClaw created separate state directories for each profile. Delete each (~/.openclaw-<profile>).

Remote Mode

If you used OpenClaw in remote mode (server or headless host), the gateway and state reside on that host. Run these uninstall steps on that machine too.

Common Partial Uninstall Mistakes

  • Running npm uninstall -g openclaw only removes the CLI; the gateway and state remain.

  • Simply deleting the openclaw binary does not stop persistent services.

  • Legacy profile names may leave orphaned service units or launch agents behind.

To avoid these mishaps, make sure to follow every step of the tutorial above.

Clean Uninstall Checklist

Here’s the full uninstall checklist you can follow:

  1. If CLI available: openclaw uninstall –all –yes –non-interactive .

  2. Stop and remove gateway services (LaunchAgent / systemd / Task Scheduler).

  3. Delete all state and config directories.

  4. Remove global CLI (npm, pnpm, or bun).

  5. Optional: remove macOS app and Docker components.

  6. Verify no services, binaries, or data remain.

And… all done! If you got this far, everything should be fixed now. 

If you need more details or information, you can find all the documentation here on the OpenClaw official page.

Giulia Dose
Giulia Dose

Leave a Reply

Your email address will not be published. Required fields are marked *