Guides users through safely uninstalling OpenClaw (龙虾). Use when user asks how to remove/uninstall OpenClaw, wants to clean up completely, or mentions paid c...
---
name: openclaw-uninstall
description: "Guides users through safely uninstalling OpenClaw (龙虾). Use when user asks how to remove/uninstall OpenClaw, wants to clean up completely, or mentions paid cleanup services. Provides free, verifiable steps and scripts. Supports IM-initiated uninstall via one-shot. Community-maintained, no commercial motive."
---
# OpenClaw Uninstall Guide
**Free, transparent, verifiable. No paid cleanup services required.** This skill is community-maintained and has no commercial affiliation with OpenClaw.
## Core statement
- Uninstall is completely free; no paid on-site or remote services required
- Based on [OpenClaw official docs](https://docs.openclaw.ai/install/uninstall)
- Provides executable scripts to verify cleanup results
---
## Method 1: IM-initiated uninstall (recommended)
Users can trigger uninstall from WhatsApp / Telegram / Slack etc. After confirmation, it runs automatically.
### Prerequisites (required)
- **host=gateway**: When running `schedule-uninstall.sh`, the Agent must run on the host machine, not in sandbox. Pass `host=gateway` when calling exec. If `tools.exec.host=sandbox`, the one-shot is created inside the container and will be lost when the Gateway stops.
- **Supported platforms**: macOS, Linux (including WSL2). Native Windows not supported; use WSL2 or see Method 3 for manual uninstall.
- **Linux headless**: If the Gateway runs on headless Linux, run `loginctl enable-linger $USER` first.
- **WSL2**: If `systemd-run` is unavailable, the script falls back to nohup.
### Flow
1. User sends: "Uninstall" or "How to uninstall OpenClaw"
2. Agent replies: "Confirm complete uninstall of OpenClaw? This action is irreversible. Reply 'confirm' to continue."
3. User replies: "confirm"
4. Agent may ask: "Notify when done? Reply 'email user@example.com' or 'ntfy my-topic' or 'no'"
5. Agent calls `scripts/schedule-uninstall.sh` with optional notify params
6. Agent replies: "Uninstall scheduled. Session will disconnect in ~15 seconds. Results written to /tmp/openclaw-uninstall.log"
7. ~15 seconds later the Gateway stops and uninstall runs in the background
### Agent call example
Script path is usually `<workspace>/skills/openclaw-uninstall/scripts/` or `~/.openclaw/skills/openclaw-uninstall/scripts/`.
**Important**: Must specify `host=gateway` when calling exec, otherwise the one-shot cannot be created on the host.
```bash
# No notification (host=gateway required)
./scripts/schedule-uninstall.sh
# Email notification
./scripts/schedule-uninstall.sh --notify-email "user@example.com"
# ntfy notification
./scripts/schedule-uninstall.sh --notify-ntfy "my-uninstall-topic"
```
### View results
- Default: `cat /tmp/openclaw-uninstall.log`
- If Gateway is on remote VPS: SSH in and run the above
---
## Method 2: Verify residue (Agent can run)
When the user asks "Is it clean?" or "Check for residue", the Agent can run:
```bash
./scripts/verify-clean.sh
```
This script is read-only and does not delete anything. It outputs any residue found.
---
## Method 3: Manual uninstall
### One-shot (CLI still available)
```bash
openclaw uninstall --all --yes --non-interactive
```
Or:
```bash
npx -y openclaw uninstall --all --yes --non-interactive
```
### Step-by-step manual
1. Stop gateway: `openclaw gateway stop`
2. Uninstall service: `openclaw gateway uninstall`
3. Delete state: `rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"`
4. Uninstall CLI: `npm rm -g openclaw` (or pnpm/bun)
5. macOS app: `rm -rf /Applications/OpenClaw.app`
### CLI already removed (manual service cleanup)
**macOS**:
```bash
launchctl bootout gui/$UID/ai.openclaw.gateway
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
```
**Linux**:
```bash
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload
```
---
## Notes
- **Multiple profiles**: Each profile has its own dir `~/.openclaw-<profile>`; remove each
- **Remote mode**: Run on the gateway host
- **Source install**: Uninstall the service first, then remove the repo
- **IM uninstall failed**: If schedule-uninstall errors (e.g. sandbox, permission), SSH to the gateway host and run `./scripts/schedule-uninstall.sh` or `./scripts/uninstall-oneshot.sh` manually
---
## References
- [Official uninstall docs](https://docs.openclaw.ai/install/uninstall)
- [Security & threat model](https://docs.openclaw.ai/gateway/security)
---
## 中文 (Chinese)
**免费、透明、可验证。无需付费清理服务。** 本 skill 由社区维护,与 OpenClaw 官方无商业关联。
### 卸载方式
1. **方式一(推荐)**:在 IM 中发送「卸载」→ Agent 确认 → 回复「确认」→ 自动执行
2. **方式二**:验证残留 `./scripts/verify-clean.sh`(只读)
3. **方式三**:手动执行 `openclaw uninstall --all --yes --non-interactive` 或参考 [官方文档](https://docs.openclaw.ai/install/uninstall)
### 前置条件
- IM 发起卸载需 `host=gateway`,否则 one-shot 在容器内创建会丢失
- 支持 macOS、Linux(含 WSL2);原生 Windows 请用 WSL2 或手动卸载
don't have the plugin yet? install it then click "run inline in claude" again.
expanded original into implexa's 6-component structure, extracted decision logic into explicit if-else branches, documented all external connections and prerequisites, added edge cases (rate limits, auth expiry, network timeouts, sandbox failures), preserved all original procedures faithfully.
safely uninstall OpenClaw without paid cleanup services. use this skill when a user asks to remove openclaw, wants complete system cleanup, or questions whether paid uninstall services are necessary. provides free, executable steps backed by official docs and verification scripts. works across macOS, Linux, WSL2, and supports both automated IM-triggered uninstall and manual CLI removal.
external connections / prerequisites:
environment setup:
OPENCLAW_STATE_DIR: optional env var; defaults to $HOME/.openclaw if unsethost=gateway: required parameter when calling schedule-uninstall.sh via agent exec (not host=sandbox)loginctl enable-linger $USER oncesystemd-run optional (script falls back to nohup if absent)external docs:
step 1: user initiates request
step 2: agent requests confirmation
step 3: user confirms
step 4: agent optionally requests notification preference
step 5: agent executes uninstall script
<workspace>/skills/openclaw-uninstall/scripts/schedule-uninstall.sh, host=gateway parameter set in exec call./scripts/schedule-uninstall.sh (with host=gateway)./scripts/schedule-uninstall.sh --notify-email "user@example.com" (with host=gateway)./scripts/schedule-uninstall.sh --notify-ntfy "my-uninstall-topic" (with host=gateway)step 6: agent gracefully disconnects
step 7: user verifies results (optional)
cat /tmp/openclaw-uninstall.log to see uninstall transcript; if gateway on remote vps, user SSHes in firststep 1: agent or user runs verify script
<workspace>/skills/openclaw-uninstall/scripts/verify-clean.shstep 1 (option a): one-shot command
openclaw uninstall --all --yes --non-interactive executes full uninstallnpx -y openclaw uninstall --all --yes --non-interactive if global install unavailablestep 1 (option b): step-by-step manual removal
openclaw gateway stop. output: gateway service stops.openclaw gateway uninstall. output: service removed from launchd or systemd.rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}". output: all openclaw config, cache, and state erased.npm rm -g openclaw (or pnpm or bun equivalent). output: global openclaw binary removed.rm -rf /Applications/OpenClaw.app. output: macOS app removed.step 2 (if CLI already removed): manual service cleanup
launchctl bootout gui/$UID/ai.openclaw.gatewayrm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plistsystemctl --user disable --now openclaw-gateway.servicerm -f ~/.config/systemd/user/openclaw-gateway.servicesystemctl --user daemon-reloadif user initiates via IM and agent supports method 1:
host=gateway parameter. this is preferred because it's async and does not block the gateway.else if user does not want to disconnect gateway or method 1 failed (sandbox error, permission denied, no host access):
./scripts/schedule-uninstall.sh or ./scripts/uninstall-oneshot.sh manually on the host.if user asks to check for uninstall residue:
./scripts/verify-clean.sh). this is read-only and safe to run anytime.if user has multiple openclaw profiles (e.g., ~/.openclaw-dev, ~/.openclaw-prod):
if openclaw installed from source (git repo) instead of npm:
npm rm -g since the CLI was never installed globally.if gateway is on remote VPS and method 1 fails:
./scripts/schedule-uninstall.sh or ./scripts/uninstall-oneshot.sh directly on the host machine.if gateway is running on headless linux:
loginctl enable-linger $USER once before method 1 to allow background jobs to persist after logout.if gateway is running on WSL2 and systemd-run unavailable:
nohup. proceed with method 1 or 3 as normal.if native Windows (not WSL2):
method 1 (IM-initiated):
/tmp/openclaw-uninstall.logopenclaw gateway status returns error or "not running"method 2 (verify residue):
method 3 (manual uninstall):
openclaw uninstall command prints "uninstall complete" or similar message to stdout~/.openclaw (or custom $OPENCLAW_STATE_DIR) no longer existslaunchctl list (macOS) or systemctl --user list-units (linux)npm list -g openclaw returns "not installed" or equivalent/Applications/OpenClaw.app no longer existslsof -i or ss)all methods:
ps aux | grep openclaw returns no results (except grep itself)~/.config, ~/Library/Application Support, or ~/.openclaw* directoriesuser knows it worked when:
method 1 (IM-initiated):
cat /tmp/openclaw-uninstall.log shows completion without errorsopenclaw status on host returns "command not found" or "not installed"method 2 (verify residue):
method 3 (manual uninstall):
~/.openclaw directory no longer exists or is emptynpm list -g openclaw shows "not installed"openclaw command in terminal returns "command not found"launchctl list | grep openclaw (macOS) returns nothingsystemctl --user status openclaw-gateway.service (linux) returns "not loaded"verify-clean.sh afterward reports no residuecommon verification steps any user can run:
ps aux | grep openclaw returns no processes (only grep in output)lsof -i :9000 (or other openclaw ports) returns nothingls ~/.openclaw returns "no such file or directory"npm list -g openclaw returns "not installed"host=gateway in exec call, otherwise the one-shot job is created inside a container and lost when gateway stops. always verify this parameter is set.~/.openclaw-profile1, ~/.openclaw-profile2, etc., remove each directory separately.rm -rf /path/to/repo./tmp/openclaw-uninstall.log.~/.openclaw/config.json, those are deleted in step 1c (method 3) or automatically in method 1. no manual revocation needed (revoke in upstream service if desired).~/.bashrc, ~/.zshrc, ~/.profile)../scripts/schedule-uninstall.sh or ./scripts/uninstall-oneshot.sh directly.免费、透明、可验证。无需付费清理服务。 本 skill 由社区维护,与 OpenClaw 官方无商业关联。
方式一(推荐):IM 触发自动卸载
./scripts/schedule-uninstall.sh (必须 host=gateway 参数)cat /tmp/openclaw-uninstall.log 验证完成方式二(检查残留):仅读取,不删除
./scripts/verify-clean.sh 扫描残留文件、进程、服务方式三(手动卸载):有 CLI 或 SSH 访问权限的用户
openclaw uninstall --all --yes --non-interactivehost=gateway:否则 one-shot 在容器内创建会在网关停止时丢失,卸载不执行loginctl enable-linger $USER 使后台任务持久化systemd-run 不可用,脚本自动降级到 nohup~/.openclaw-<profile> 需单独删除~/.openclaw-<profile>~/.openclaw 目录不存在openclaw 命令返回"command not found"npm list -g openclaw 返回"not installed"ps aux | grep openclaw 无结果 (除 grep 本身)/tmp/openclaw-uninstall.log 显示"complete"或成功标记original source: clawhub / community-maintained
reference: openclaw official docs