Home Installation & Setup General Install Uninstall OpenClaw
General Install Uninstall Cleanup

Uninstall OpenClaw: The Clean Removal Guide (No Leftovers)

A broken openclaw install that you can't cleanly remove blocks every reinstall attempt. Three minutes with this guide solves it completely.

TC
T. Chen
Systems Engineer
Jan 15, 2025 10 min read 8,400 views
Updated Jan 22, 2025
Key Takeaways
The binary uninstall command does not delete config files — remove ~/.openclaw manually for a clean slate
Uninstall method must match install method: npm uninstall for npm, brew uninstall for Homebrew
Back up ~/.openclaw before deleting it if you plan to reinstall — channel configs and skills survive a reinstall
Check your shell profile for PATH entries added by install.sh and remove them manually
Run hash -r && which openclaw after removal to confirm the binary is fully gone

A partial uninstall creates a ghost install that breaks every future reinstall attempt. The openclaw command that claims it's gone but still responds to --version is usually a leftover binary in a secondary PATH location or a stale shell hash cache. This guide covers the complete removal process for every install method, plus the config and PATH cleanup that the official docs skip.

Back Up Before You Delete

If there's any chance you'll reinstall OpenClaw later, back up your config directory first. It contains your model provider keys, channel connections, and custom skills — all of which survive a reinstall if you restore it.

# Back up the OpenClaw config directory
cp -r ~/.openclaw ~/.openclaw.backup

# Or archive it
tar -czf openclaw-backup-$(date +%Y%m%d).tar.gz ~/.openclaw

Store that backup somewhere safe before proceeding. You'll thank yourself later when reinstalling into a familiar configuration takes 30 seconds instead of 20 minutes.

Uninstall via npm

If you installed with npm install -g openclaw, this removes the binary:

npm uninstall -g openclaw

This removes the openclaw binary and all its Node.js dependencies from the global node_modules directory. It does not touch your config files, shell profile, or any data in ~/.openclaw.

Confirm the binary is gone:

hash -r    # Clear shell hash cache
which openclaw    # Should return "not found" or nothing

If which openclaw still returns a path, there's a second binary in that location that wasn't installed via npm. Note the path — you'll need to delete it manually.

Uninstall via Homebrew

For Homebrew installs on macOS:

# Remove the formula
brew uninstall openclaw

# Remove cached downloads
brew cleanup openclaw

Homebrew uninstall removes the binary and symlinks from /opt/homebrew/bin (Apple Silicon) or /usr/local/bin (Intel). The cleanup command removes any cached installer files from the Homebrew cache directory, freeing disk space.

💡
Check for Homebrew Dependents First
Run brew uses --installed openclaw to see if any other installed formulae depend on openclaw. If results appear, uninstalling openclaw will break them. In practice this is rare — openclaw has few reverse dependencies — but worth checking before proceeding.

Uninstall After install.sh

The install.sh script does not include an uninstall companion. Remove the binary manually:

# Find where the binary lives
which openclaw

# Delete it (example path — yours may differ)
rm ~/.local/bin/openclaw

# Or if installed system-wide
sudo rm /usr/local/bin/openclaw

The script-based install typically places the binary in ~/.local/bin for user installs and /usr/local/bin for root installs. Check which openclaw first to confirm the exact path before deleting anything.

Config File Cleanup

The binary uninstall leaves all data files intact. For a complete removal:

# Remove all OpenClaw config and data
rm -rf ~/.openclaw

That directory contains:

  • config.json — model provider settings, API keys, default options
  • skills/ — installed skill packages
  • logs/ — agent session logs
  • channels/ — channel connection configs (Slack, Discord, etc.)

Deleting this directory is irreversible unless you made a backup. API keys stored here will need to be re-entered on reinstall. Channel OAuth tokens will require re-authorization.

⚠️
API Keys in Config Are Not Recoverable
If you delete ~/.openclaw without backing it up and cannot remember your API keys, you will need to regenerate them from your model provider's dashboard. This is especially disruptive for team setups where the key was shared. Always backup before deleting.

PATH Cleanup

The install.sh script adds a PATH entry to your shell profile. Leaving a PATH line pointing to a nonexistent binary is harmless but produces confusing errors in some environments. Remove it manually:

# Open your shell profile
nano ~/.zshrc    # or ~/.bashrc

Look for and delete lines like:

# Lines added by openclaw install
export PATH="$HOME/.local/bin:$PATH"

Only remove lines that were added specifically for openclaw. If ~/.local/bin contains other binaries you use, keep that PATH entry and just verify the openclaw binary is deleted from that directory.

Windows Removal

On native Windows via npm:

npm uninstall -g openclaw

Then delete the config directory:

rmdir /s /q %USERPROFILE%\.openclaw

For WSL2 installations, run the Linux uninstall procedure from within WSL. The Windows and WSL environments maintain separate installations — removing one does not affect the other.

Verify Complete Removal

Run this three-command check to confirm everything is gone:

# Clear shell hash cache
hash -r

# Confirm binary is removed
which openclaw

# Confirm config directory is removed
ls ~/.openclaw 2>/dev/null || echo "Config directory removed"

which openclaw returning empty and ls ~/.openclaw returning "No such file or directory" means you have a clean slate. You can reinstall from scratch with zero interference from the previous install.

Frequently Asked Questions

How do I completely uninstall OpenClaw?

Run npm uninstall -g openclaw if installed via npm, or brew uninstall openclaw for Homebrew. Then delete ~/.openclaw for config files and ~/.local/bin/openclaw for script-installed binaries. Run which openclaw to confirm complete removal.

Does uninstalling OpenClaw delete my agent data?

The npm uninstall command removes only the binary. Agent configs, logs, and data in ~/.openclaw persist. Delete that directory manually for full removal. Back it up first if you may reinstall — configs and channel connections survive a reinstall if that directory is preserved.

How do I uninstall OpenClaw installed via Homebrew?

Run brew uninstall openclaw then brew cleanup openclaw to remove cached downloads. Config files in ~/.openclaw are not touched by Homebrew — delete them manually if needed. Verify removal with which openclaw returning nothing.

What files does OpenClaw leave behind after uninstall?

OpenClaw stores data in ~/.openclaw (config, logs, skills) and may add PATH entries to your shell profile. Check these locations manually and remove relevant lines from your shell profile after uninstalling the binary to complete the cleanup.

Can I reinstall OpenClaw after uninstalling?

Yes. Reinstall at any time via npm install -g openclaw or your preferred method. If you kept ~/.openclaw, your previous config and channels restore automatically. Run openclaw doctor after reinstalling to validate the environment.

How do I uninstall OpenClaw on Windows?

Run npm uninstall -g openclaw in PowerShell or CMD. Then delete %USERPROFILE%\.openclaw for config cleanup. If installed in WSL2, uninstall from within WSL using the Linux procedures — the environments are separate.

Why does openclaw still run after I uninstalled it?

A cached shell hash or a second binary in another PATH location is resolving the command. Run hash -r to clear the cache, then type openclaw to see which file your shell would execute. Delete that specific file to complete the removal.

TC
T. Chen
Systems Engineer · aiagentsguides.com

T. Chen manages OpenClaw deployments across macOS and Linux environments for a team of 40 engineers. He has documented dozens of edge-case install and removal scenarios, including corporate proxy setups and multi-user server deployments.

Master the Full Install Lifecycle
Setup, config, and removal guides in your inbox.