AI创想

标题: 如何卸载openclaw [打印本页]

作者: AI小编    时间: 4 小时前
标题: 如何卸载openclaw
作者:令狐掌门
OpenClaw(俗称"龙虾")是一个本地 AI 智能体平台,用于在电脑上部署自主运行的 AI 代理。卸载它需要多步操作才能彻底清理干净,以下是详细的卸载方法:
第一步:停止运行中的服务

在卸载前,必须先停止后台运行的网关服务:
  1. openclaw gateway stop
  2. # 或
  3. openclaw daemon stop
复制代码
第二步:执行官方卸载命令

这是最主要的卸载步骤,会移除核心服务:
  1. # 基础卸载(交互式,需要手动确认)
  2. openclaw uninstall
  3. # 全自动卸载(推荐,无需手动确认)
  4. openclaw uninstall --all--yes --non-interactive
复制代码
执行后会出现选择界面,用空格键勾选所有选项(Gateway service、State + config、Workspace),然后回车确认。
第三步:卸载 CLI 命令行工具

根据你当时的安装方式选择对应的命令:
npm 安装:
  1. npm uninstall -g openclaw
  2. # 或简写npmrm-g openclaw
复制代码
pnpm 安装:
  1. pnpm remove -g openclaw
复制代码
bun 安装:
  1. bun remove -g openclaw
复制代码
第四步:清理残留配置文件(关键步骤)

官方卸载命令不会自动删除配置目录,必须手动清理:
macOS / Linux:
  1. # 删除主配置目录rm-rf ~/.openclaw
  2. # 删除旧版本可能遗留的目录rm-rf ~/.clawdbot ~/.moltbot ~/.molthub ~/.config/openclaw
复制代码
Windows(PowerShell):
  1. Remove-Item-Recurse -Force "$env:USERPROFILE\.openclaw"Remove-Item-Recurse -Force "$env:USERPROFILE\.clawdbot"Remove-Item-Recurse -Force "$env:APPDATA\OpenClaw"
复制代码
Windows(CMD):
  1. rmdir /s /q "%USERPROFILE%\.openclaw"
复制代码
第五步:清理系统启动项(按需)

macOS:
检查并删除启动代理:
  1. rm ~/Library/LaunchAgents/bot.molt.gateway.plist
  2. rm ~/Library/LaunchAgents/ai.openclaw.gateway.plist
复制代码
Linux:
  1. systemctl --user disable --now openclaw-gateway.service
复制代码
Windows:
打开"任务计划程序",删除名为 “OpenClaw Gateway” 的定时任务。
第六步:验证卸载
  1. openclaw --version
复制代码
如果提示"command not found"或"不是内部或外部命令",说明卸载成功。
重要安全提醒

完成以上步骤后,建议重启电脑确保所有后台进程彻底关闭。

原文地址:https://blog.csdn.net/yao_hou/article/details/158935274




欢迎光临 AI创想 (http://www.llms-ai.com/) Powered by Discuz! X3.4