前言
Hermes Agent 的彻底卸载有以下几种方法。
方法一:使用自带卸载命令(推荐)
Hermes 提供了内置的卸载命令,这是最简单的方式。
完全卸载
hermes uninstall --full --yes
或者使用完全模式
hermes uninstall --full
只想卸载但保留配置
hermes uninstall
方法二:手动彻底删除(最干净)
如果卸载命令不可用或希望手动清理,按以下步骤操作。
第一步:停止所有 Hermes 进程
停止网关服务
hermes gateway stop
强制杀掉所有相关进程
pkill -f hermes
pkill -f hermes_cli
第二步:删除配置和数据目录
删除主配置目录(包含所有配置、记忆、API Key等)
rm -rf ~/.hermes/
检查是否有全局配置(通常不存在)
sudo rm -rf /etc/hermes/ 2>/dev/null
第三步:卸载 Python 包
pip uninstall hermes-agent -y
第四步:删除可执行文件
找到 hermes 命令位置
which hermes
删除可执行文件
rm -f ~/.local/bin/hermes
第五步:清理缓存
rm -rf ~/.cache/pip/
rm -rf ~/.hermes/.venv/
第六步:清理 Shell 配置(可选)
检查 shell 配置文件中是否有 hermes 相关内容
grep -n "hermes\|HERMES" ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null
如果有,手动编辑删除相关行
nano ~/.bashrc
验证是否完全卸载
检查命令是否还存在
hermes --version
应该提示 "command not found" 或类似错误。
检查目录是否已删除
ls -la ~/.hermes/
应该返回 "No such file or directory"。
评论 (0)
暂无评论