卸载
快捷方式:CLI 卸载
bash
openclaw uninstall该命令会:
- 停止并移除 Gateway 服务
- 删除可执行文件
- (可选)保留或删除配置与数据目录
交互式提示中选择 完全删除 将同时清除 ~/.openclaw 目录。
手动卸载
npm / pnpm 安装方式
bash
npm uninstall -g openclawbash
pnpm remove -g openclawmacOS
bash
# 1. 停止 launchd 服务
launchctl unload ~/Library/LaunchAgents/com.openclaw.gateway.plist 2>/dev/null
rm -f ~/Library/LaunchAgents/com.openclaw.gateway.plist
# 2. 删除二进制文件
rm -f /usr/local/bin/openclaw
# 或 Apple Silicon Homebrew 路径
rm -f /opt/homebrew/bin/openclaw
# 3. (可选)删除数据与配置
rm -rf ~/.openclaw
rm -rf ~/Library/Application\ Support/OpenClawLinux
bash
# 1. 停止 systemd 服务
systemctl --user stop openclaw-gateway 2>/dev/null
systemctl --user disable openclaw-gateway 2>/dev/null
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload
# 2. 删除二进制文件
rm -f ~/.openclaw/bin/openclaw
# 或全局路径
sudo rm -f /usr/local/bin/openclaw
# 3. (可选)删除数据与配置
rm -rf ~/.openclaw
rm -rf ~/.config/openclaw
rm -rf ~/.local/share/openclawWindows
powershell
# 1. 停止服务(如果注册了)
Stop-Service openclaw-gateway -ErrorAction SilentlyContinue
sc.exe delete openclaw-gateway 2>$null
# 2. 删除文件
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw" -ErrorAction SilentlyContinue
Remove-Item -Force "$env:USERPROFILE\.openclaw\bin\openclaw.exe" -ErrorAction SilentlyContinue
# 3. 从 PATH 中移除(手动)
# 打开 系统属性 > 环境变量 > 用户变量 > Path
# 移除包含 .openclaw\bin 的条目Docker 容器卸载
bash
# 停止并删除容器
docker stop openclaw-gateway && docker rm openclaw-gateway
# 删除数据卷(⚠️ 数据将丢失)
docker volume rm openclaw-home
# 删除镜像
docker rmi ghcr.io/openclaw/gateway:latest确认卸载成功
bash
# 应提示 command not found
openclaw --version
# 确认服务已停止
# macOS
launchctl list | grep openclaw
# Linux
systemctl --user list-units | grep openclaw重新安装?
如果你是为了排障而卸载,可在清理后重新安装:参阅 安装概览。
