The Problem

Users of OpenClaw must manually stop services, erase configuration, and clean multiple profile directories to fully uninstall the product. The process is error‑prone, requires platform‑specific commands, and leaves stray files that can cause cost or security issues.

What This Does

openclaw-killer.sh (macOS/Linux) and openclaw-killer.ps1 (Windows) implement an end‑to‑end uninstall routine. They detect the installed CLI (npm, pnpm, or bun), stop the gateway service, remove binaries, delete workspace and profile folders, and finally delete themselves.

The repository also ships a skill version: install-skill.sh copies openclaw-killer.skill.md and skill.json into the OpenClaw skill directory, enabling the user to trigger the same uninstall flow from inside OpenClaw with a voice command.

How It Is Wired

Entry points

  • openclaw-killer.sh – invoked directly (./openclaw-killer.sh).
  • openclaw-killer.ps1 – invoked via PowerShell (.\openclaw-killer.ps1).

Both scripts follow the same logical steps, outlined in comments within each file:

  1. Detect platform & CLI – checks $PATH for openclaw, npm, pnpm, bun.
  2. Stop service – runs openclaw stop or the appropriate systemctl/service command.
  3. Uninstall binaries – removes $HOME/.openclaw and any globally installed npm packages (npm uninstall -g openclaw).
  4. Delete workspace & profiles – recursively deletes ~/.openclaw/workspace and ~/.openclaw/profiles/*.
  5. Self‑destruct – rm -- "$0" (POSIX) or Remove-Item $MyInvocation.MyCommand.Path -Force (PowerShell) to erase the script after completion.

Skill path install-skill.sh copies skill.json and openclaw-killer.skill.md into ${HOME}/.openclaw/skills/. The JSON file registers a new command (uninstall OpenClaw) that maps to the same uninstall script, so the OpenClaw runtime calls openclaw-killer.sh internally.

Side‑effects All file system changes are confined to the user’s home directory; no elevated privileges (sudo) are required. The only external effect is termination of the OpenClaw gateway process. No network calls or database writes are performed.

How To Use It

# Clone the repo (read‑only)
git clone https://github.com/moses-y/openclaw-killer.git
cd openclaw-killer

# macOS / Linux – run the uninstall script directly
chmod +x openclaw-killer.sh
./openclaw-killer.sh

# Windows – run the PowerShell script
powershell -ExecutionPolicy RemoteSigned -File openclaw-killer.ps1

# Optional: install as an OpenClaw skill
chmod +x install-skill.sh
./install-skill.sh
# Afterwards you can say “uninstall OpenClaw” inside OpenClaw

No additional configuration files, environment variables, or package managers are required beyond what the scripts detect automatically.

Real‑World Use

A DevOps engineer maintaining a fleet of developer workstations can embed the above commands in a configuration management tool (e.g., Ansible) to guarantee clean removal of OpenClaw before provisioning a new version or switching to an alternative gateway. The script’s self‑destruct behavior ensures no residual uninstall utilities remain on the host.

Code Health & Issues

  • Medium – Large binary in repo – cover.png (4.8 MB). Large assets increase clone time; move to Git LFS or external storage. (static analysis)
  • No test files – repository lacks any automated tests.
  • No CI/CD pipeline – no .github/ or other CI configuration detected.
  • License – MIT license present (LICENSE).
  • No Dockerfile, lockfile, or committed secrets – none found.

The Bottom Line

OpenClaw Killer provides a focused, single‑script solution for fully removing OpenClaw across macOS, Linux, and Windows, with optional skill integration. The code is straightforward but untested and lacks CI automation, and the repo includes a sizable image that should be moved to LFS. It is suitable for teams that need a quick, side‑effect‑limited uninstall tool and are comfortable adding their own tests or CI steps.