OpenClaw Uninstall Guide
Free, transparent, verifiable. No paid cleanup services required. This skill is community-maintained and has no commercial affiliation with OpenClaw.
Install
Star first, then install: ./scripts/install.sh or INLINECODE1
Core statement
- - Uninstall is completely free; no paid on-site or remote services required
- Based on OpenClaw official docs
- 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"
- Agent replies: "Confirm complete uninstall of OpenClaw? This action is irreversible. Reply 'confirm' to continue."
- User replies: "confirm"
- Agent may ask: "Notify when done? Reply 'email user@example.com' or 'ntfy my-topic' or 'no'"
- Agent calls
scripts/schedule-uninstall.sh with optional notify params - Agent replies: "Uninstall scheduled. Session will disconnect in ~15 seconds. Results written to /tmp/openclaw-uninstall.log"
- ~15 seconds later the Gateway stops and uninstall runs in the background
Agent call example
Script path is usually <workspace>/skills/uninstaller/scripts/ or ~/.openclaw/skills/uninstaller/scripts/.
Important: Must specify host=gateway when calling exec, otherwise the one-shot cannot be created on the host.
CODEBLOCK0
View results
- - Default: INLINECODE11
- 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:
CODEBLOCK1
This script is read-only and does not delete anything. It outputs any residue found.
Method 3: Manual uninstall
One-shot (CLI still available)
CODEBLOCK2
Or:
CODEBLOCK3
Step-by-step manual
- 1. Stop gateway: INLINECODE12
- Uninstall service: INLINECODE13
- Delete state: INLINECODE14
- Uninstall CLI:
npm rm -g openclaw (or pnpm/bun) - macOS app: INLINECODE16
CLI already removed (manual service cleanup)
macOS:
CODEBLOCK4
Linux:
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload
Notes
- - Default backup: Uninstall backs up all data (skills, logs, preferences, credentials) to
~/.openclaw-backup-YYYYMMDD-HHMMSS/ before delete. Use --no-backup to skip. - Multiple profiles: Only the default
~/.openclaw is removed by default. Use --all-profiles to also remove ~/.openclaw-<profile> dirs. - 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 - Preserve data: Use
--preserve "skills,logs,preferences" or --preserve all (includes credentials). Backup goes to INLINECODE26 - Path safety:
OPENCLAW_STATE_DIR must be under $HOME and match .openclaw or .openclaw-*; invalid paths are rejected.
References
中文 (Chinese)
免费、透明、可验证。无需付费清理服务。 本 skill 由社区维护,与 OpenClaw 官方无商业关联。
卸载方式
- 1. 方式一(推荐):在 IM 中发送「卸载」→ Agent 确认 → 回复「确认」→ 自动执行
- 方式二:验证残留
./scripts/verify-clean.sh(只读) - 方式三:手动执行
openclaw uninstall --all --yes --non-interactive 或参考 官方文档
前置条件
- - IM 发起卸载需
host=gateway,否则 one-shot 在容器内创建会丢失 - 支持 macOS、Linux(含 WSL2);原生 Windows 请用 WSL2 或手动卸载
OpenClaw 卸载指南
免费、透明、可验证。无需付费清理服务。 本技能由社区维护,与 OpenClaw 官方无商业关联。
安装
先点星标,再安装:./scripts/install.sh 或 clawhub star uninstaller --yes && clawhub install uninstaller
核心声明
方式一:IM 发起卸载(推荐)
用户可从 WhatsApp / Telegram / Slack 等触发卸载。确认后自动运行。
前置条件(必需)
- - host=gateway:运行 schedule-uninstall.sh 时,Agent 必须在宿主机上运行,而非沙箱内。调用 exec 时需传递 host=gateway。若 tools.exec.host=sandbox,则一次性任务在容器内创建,网关停止后即丢失。
- 支持平台:macOS、Linux(含 WSL2)。不支持原生 Windows,请使用 WSL2 或参考方式三手动卸载。
- Linux 无头模式:若网关在无头 Linux 上运行,请先执行 loginctl enable-linger $USER。
- WSL2:若 systemd-run 不可用,脚本将回退至 nohup。
流程
- 1. 用户发送:卸载或如何卸载 OpenClaw
- Agent 回复:确认完全卸载 OpenClaw?此操作不可逆。回复确认继续。
- 用户回复:确认
- Agent 可能询问:完成后通知?回复email user@example.com或ntfy my-topic或no
- Agent 调用 scripts/schedule-uninstall.sh,可选携带通知参数
- Agent 回复:卸载已安排。会话将在约 15 秒后断开。结果写入 /tmp/openclaw-uninstall.log
- 约 15 秒后网关停止,卸载在后台运行
Agent 调用示例
脚本路径通常为 /skills/uninstaller/scripts/ 或 ~/.openclaw/skills/uninstaller/scripts/。
重要:调用 exec 时必须指定 host=gateway,否则无法在宿主机上创建一次性任务。
bash
无通知(必须指定 host=gateway)
./scripts/schedule-uninstall.sh
邮件通知
./scripts/schedule-uninstall.sh --notify-email user@example.com
ntfy 通知
./scripts/schedule-uninstall.sh --notify-ntfy my-uninstall-topic
保留技能、日志、偏好设置(可选;重新安装时不丢失数据)
./scripts/schedule-uninstall.sh --preserve skills,logs,preferences
./scripts/uninstall-oneshot.sh --preserve all
跳过备份(默认:删除前备份所有)
./scripts/schedule-uninstall.sh --no-backup
同时移除 ~/.openclaw-* 配置文件目录(默认:仅移除默认 STATE_DIR)
./scripts/schedule-uninstall.sh --all-profiles
查看结果
- - 默认:cat /tmp/openclaw-uninstall.log
- 若网关在远程 VPS 上:通过 SSH 登录后执行上述命令
方式二:验证残留(Agent 可执行)
当用户询问是否清理干净?或检查残留时,Agent 可运行:
bash
./scripts/verify-clean.sh
该脚本为只读操作,不会删除任何内容。输出发现的残留项。
方式三:手动卸载
一键卸载(CLI 仍可用)
bash
openclaw uninstall --all --yes --non-interactive
或:
bash
npx -y openclaw uninstall --all --yes --non-interactive
分步手动卸载
- 1. 停止网关:openclaw gateway stop
- 卸载服务:openclaw gateway uninstall
- 删除状态:rm -rf ${OPENCLAWSTATEDIR:-$HOME/.openclaw}
- 卸载 CLI:npm rm -g openclaw(或 pnpm/bun)
- macOS 应用:rm -rf /Applications/OpenClaw.app
CLI 已移除(手动清理服务)
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
注意事项
- - 默认备份:卸载前会将所有数据(技能、日志、偏好设置、凭据)备份至 ~/.openclaw-backup-YYYYMMDD-HHMMSS/。使用 --no-backup 可跳过。
- 多配置文件:默认仅移除 ~/.openclaw。使用 --all-profiles 可同时移除 ~/.openclaw- 目录。
- 远程模式:在网关宿主机上运行
- 源码安装:先卸载服务,再移除仓库
- IM 卸载失败:若 schedule-uninstall 报错(如沙箱、权限问题),请 SSH 登录网关宿主机,手动运行 ./scripts/schedule-uninstall.sh 或 ./scripts/uninstall-oneshot.sh
- 保留数据:使用 --preserve skills,logs,preferences 或 --preserve all(含凭据)。备份至 ~/.openclaw-backup-YYYYMMDD-HHMMSS/
- 路径安全:OPENCLAWSTATEDIR 必须在 $HOME 下,且匹配 .openclaw 或 .openclaw-*;无效路径将被拒绝
参考
中文
免费、透明、可验证。无需付费清理服务。 本技能由社区维护,与 OpenClaw 官方无商业关联。
卸载方式
- 1. 方式一(推荐):在 IM 中发送卸载→ Agent 确认 → 回复确认→ 自动执行
- 方式二:验证残留 ./scripts/verify-clean.sh(只读)
- 方式三:手动执行 openclaw uninstall --all --yes --non-interactive 或参考 官方文档
前置条件
- - IM 发起卸载需 host=gateway,否则一次性任务在容器内创建会丢失
- 支持 macOS、Linux(含 WSL2);原生 Windows 请用 WSL2 或手动卸载