How to Completely Uninstall OpenClaw

This article provides detailed steps and automated scripts for completely uninstalling OpenClaw and its related components on Windows, Linux, and macOS.

OpenClaw, a recently popular AI agent, is very convenient to install and use. However, recent news has also revealed that this tool poses significant security risks and may not be suitable for enterprise environments or computers containing personal privacy. Nevertheless, due to the unique installation method of OpenClaw, it may not be easy to uninstall it. This article will provide a detailed guide to teach you how to uninstall OpenClaw.

We will cover manual removal steps and provide recommended automated cleanup scripts for Windows, Linux, and macOS.

Why is a Complete Uninstall Necessary?

In some cases, a simple npm uninstall may not be enough to remove all traces of OpenClaw. Remnants can include:

  • Lingering configuration files
  • Active background processes
  • Caches stored in various user directories
  • Paths added to environment variables

To streamline the process, we have developed automated cleanup scripts for each platform. These scripts are designed to detect your Node.js environment, terminate any related processes, and remove the global packages.

Windows (PowerShell)

Open PowerShell with administrator privileges and execute the following command:

1
irm https://blog.codeglimpse.top/post/openclaw-uninstall/CleanupOpenClawForWindows.ps1 | iex

Linux (Bash)

Open your terminal and run the following command:

1
curl -sSL https://blog.codeglimpse.top/post/openclaw-uninstall/CleanupOpenClawForLinux.sh | bash

macOS (Bash)

Open your terminal and run the following command:

1
curl -sSL https://blog.codeglimpse.top/post/openclaw-uninstall/CleanupOpenClawForMacOS.sh | bash

Manual Uninstallation Guide

If you prefer to handle the uninstallation manually, please follow the steps below:

1. Terminate Running Processes

Ensure no OpenClaw-related Node.js processes are active. You can use Task Manager on Windows or the top/ps commands on Linux and macOS to find and terminate them.

2. Uninstall Global Packages

Use your preferred package manager to execute the uninstall command:

1
2
3
4
5
# Using npm
npm uninstall -g openclaw openclaw-cn

# Using pnpm
pnpm uninstall -g openclaw openclaw-cn

3. Clean Up Residual Files

Check the following locations and delete any folders related to OpenClaw:

  • Windows: C:\Users\<YourUsername>\AppData\Roaming\npm\node_modules\openclaw
  • Linux/macOS: /usr/local/lib/node_modules/openclaw or ~/.npm-global/lib/node_modules/openclaw

Frequently Asked Questions

Q: I’m getting a “permission denied” error when running the script. A: On Windows, ensure you are running PowerShell with administrator privileges. On Linux and macOS, you may need to use sudo.

Q: The script reports that Node.js was not found. A: This can happen if Node.js is not in your system’s PATH. Our scripts attempt to locate common installation directories (like those used by NVM), but you may need to ensure your environment is configured correctly.


We hope this guide helps you successfully uninstall OpenClaw. If you have any questions, feel free to leave a comment below.

Built with Hugo
Theme Stack designed by Jimmy