Skip to main content

🦞💥 一键彻底卸载 OpenClaw - 温柔地说再见

Project description

🦞💥 OpenClaw Uninstaller

PyPI version Python License

卸载虾出品 🦞💥
一键彻底卸载 OpenClaw - 先存档,再告别

Goodbye

✨ 新特性:联动快照

卸载前自动备份,重装后可完全恢复身份!

# 卸载时自动提示创建快照
openclaw-uninstall

# 📦 保存为 tar.gz(可导出到其他机器)
# 📁 或保存到快照目录(配合 ocs 恢复)

🚀 快速开始

安装

pip install openclaw-uninstaller

运行

openclaw-uninstall
# 或简写
ocu

📋 卸载流程(带快照保护)

┌────────────────────────────────────────────────────────────┐
│                                                            │
│   🛑 步骤 1/4  停止服务        🔍 停止 OpenClaw 进程       │
│   ─────────────────────────────────────────────────────   │
│   💾 步骤 2/4  创建快照        📸 备份配置(可选)          │
│        - 📦 保存为 tar.gz(推荐,可迁移)                  │
│        - 📁 保存到快照目录(配合 ocs)                     │
│        - 🚫 跳过备份(危险!)                             │
│   ─────────────────────────────────────────────────────   │
│   📦 步骤 3/4  卸载 npm 包     🗑️  npm uninstall          │
│   ─────────────────────────────────────────────────────   │
│   🗑️  步骤 4/4  删除文件        🧹  清理所有文件          │
│                                                            │
│              ✨ 卸载完成 + 快照已保存 ✨                    │
└────────────────────────────────────────────────────────────┘

💾 快照功能详解

选项 1:保存为 tar.gz(推荐)

卸载前快照
选项:
1. 📦 保存为 tar.gz 文件(推荐,可导出到其他机器)
2. 📁 保存到快照目录(配合 ocs 命令恢复)
3. 🚫 跳过备份(配置将丢失!)

请选择 (1/2/3): 1
保存路径 [/home/user/Desktop]: 

       📸 ✨
      ╱    ╲
     │  💾  │   ← 快照已保存
      ╲    ╱
       ────
   你的身份已安全存档
   重装后可随时恢复!

✅ 快照已保存!
  📦 文件: /home/user/Desktop/openclaw_backup_20250115_143022.tar.gz
  💾 大小: 12.5 MB
  🔖 校验: a1b2c3d4

选项 2:保存到快照目录

请选择 (1/2/3): 2

(保存到 ~/.openclaw_snapshots/,配合 openclaw-snapshot 工具使用)

恢复命令:
  ocs list                           # 查看快照
  ocs restore openclaw_backup_xxx   # 恢复

🔄 完整恢复流程

场景:卸载后重装

# 1. 卸载(已创建快照)
openclaw-uninstall
# → 快照保存到 ~/Desktop/openclaw_backup_xxx.tar.gz

# 2. 重新安装 OpenClaw
curl -fsSL https://openclaw.ai/install.sh | bash

# 3. 安装快照工具
pip install openclaw-snapshot

# 4. 导入并恢复快照
ocs import ~/Desktop/openclaw_backup_xxx.tar.gz
ocs restore openclaw_backup_xxx

# 5. 重启服务
openclaw gateway restart

# 🎉 一切恢复原样!

场景:迁移到新机器

# 旧机器:导出快照
openclaw-uninstall
# → 选择选项 1,保存到 ~/Desktop/backup.tar.gz
scp ~/Desktop/backup.tar.gz new-machine:~/

# 新机器:导入快照
# 1. 安装 OpenClaw
# 2. pip install openclaw-snapshot
# 3. ocs import ~/backup.tar.gz
# 4. ocs restore backup

🎯 命令选项

openclaw-uninstall      # 交互式卸载(推荐)
openclaw-uninstall -y   # 自动确认(危险!)
ocu                     # 简写命令

🖥️ 界面预览

$ openclaw-uninstall

    💥 ╔═══════════════════════════════════════╗
           OpenClaw 完全卸载工具                         💾 先存档,再告别 👋                   ╚═══════════════════════════════════════╝

你好!我是卸载虾 🦞
我会帮你安全卸载 OpenClaw
先存档,再告别,随时可以回来~

[█░░░░░░░░░░░░░░] 步骤 2/4
💾 创建卸载前快照

卸载会删除 ~/.openclaw 目录
建议先创建快照,方便以后恢复身份

选项:
1. 📦 保存为 tar.gz 文件(推荐,可导出到其他机器)
2. 📁 保存到快照目录(配合 ocs 命令恢复)
3. 🚫 跳过备份(配置将丢失!)

请选择 (1/2/3): 1
保存路径 [/home/user/Desktop]: /mnt/backup

✅ 快照已保存!
  📦 文件: /mnt/backup/openclaw_backup_20250115_143022.tar.gz
  💾 大小: 12.5 MB

...(卸载过程)...

================================================================
🦞 OpenClaw 已完全卸载
================================================================

💾 快照已保存,以后可以恢复:
  📦 文件: /mnt/backup/openclaw_backup_20250115_143022.tar.gz

恢复方法:
  1. 重新安装 OpenClaw
  2. 安装快照工具: pip install openclaw-snapshot
  3. 导入快照: ocs import /mnt/backup/openclaw_backup_xxx.tar.gz
  4. 恢复快照: ocs restore <快照ID>

         🦞
        /  \
        👋     挥手告别
        \  /
         🦞
    
     感谢陪伴     有缘再会!

🧹 清理内容

位置 内容 是否备份
~/.openclaw 主配置目录 ✅ 是
~/.config/openclaw 配置缓存 ✅ 是
/usr/local/bin/openclaw* 全局命令 ❌ 否
~/.npm-global/ npm 安装 ❌ 否
Shell 配置 PATH、别名 ❌ 否

🔄 与其他工具配合使用

# 1. 部署工具安装
openclaw-feishu deploy

# 2. 快照工具备份
ocs create  # 创建当前状态快照

# 3. 卸载工具(带快照)
openclaw-uninstall  # 卸载前自动备份

# 4. 重装后恢复
ocs import xxx.tar.gz
ocs restore xxx

📦 快照文件结构

openclaw_backup_20250115_143022/
├── snapshot.json           # 元数据(时间、大小、校验和)
└── openclaw_data/          # 完整的 ~/.openclaw 目录
    ├── openclaw.json
    ├── config/
    ├── credentials/
    ├── identity/
    └── ...

🐛 常见问题

Q: 恢复快照后身份验证失败?

# 检查恢复后的文件权限
ls -la ~/.openclaw/credentials/

# 可能需要重新授权某些服务
openclaw config

Q: 快照文件太大?

# 快照已自动排除日志和缓存
# 如果还是很大,可以手动清理后再卸载:
rm -rf ~/.openclaw/logs/
rm -rf ~/.openclaw/media/

Q: 跨系统恢复(如 Linux → macOS)?

# 完全支持!快照是跨平台的
# 注意:绝对路径配置可能需要手动调整

📄 许可证

MIT License © 2025 Duka Works


🦞💥 Made with love by 卸载虾 🦞💥
GitHubPyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openclaw_uninstaller-1.0.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openclaw_uninstaller-1.0.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file openclaw_uninstaller-1.0.0.tar.gz.

File metadata

  • Download URL: openclaw_uninstaller-1.0.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for openclaw_uninstaller-1.0.0.tar.gz
Algorithm Hash digest
SHA256 90bb3cd26a3ddbb144d358b0a353230eb917b24d697b24f7830eee2fbf67333e
MD5 29e7307b216fd450f8cb9228dd24e4ac
BLAKE2b-256 e4115f80dd64ad1ee658bd7d1890d324fe2d41b94c070e4e36ea12f8595d3417

See more details on using hashes here.

File details

Details for the file openclaw_uninstaller-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openclaw_uninstaller-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c105f974751518a9b6204357a4b1bfe82b9b68578ff4cc925829dd565ea12488
MD5 402b26950061c5c5cd72ac640d609364
BLAKE2b-256 05895fb941f0735f60e85c39b8495f5aea044de554ea624919a641c3e2ba997c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page