RemoveMacAI 完整选项指南:--keep 选择性保留 AI 功能,--dry-run 与 --yes 快速执行
【免费下载链接】RemoveMacAITurn off Apple Intelligence on macOS 27 and get its disk space back. One command, fully reversible.项目地址: https://gitcode.com/gh_mirrors/re/RemoveMacAI
macOS 27 取消了 Apple Intelligence 的总开关,RemoveMacAI 用一条命令帮你彻底关闭并释放约 12 GB 磁盘空间。本文详解--keep、--dry-run、--yes三个核心选项,让你精确掌控每一步操作。
⚡ 快速安装 RemoveMacAI
通过 Homebrew 安装最方便:
brew install omlahore/tap/removemacai removemacai或使用仓库提供的 install.sh 一行脚本(自动校验 SHA-256,不永久安装)。
⚠️ 需要 macOS 27 + Apple 芯片。安装后运行
removemacai即可开始。
📋 完整命令选项一览表
| 命令 | 作用 |
|---|---|
removemacai | 显示当前状态后关闭 Apple Intelligence(交互确认) |
removemacai status | 查看各功能开关状态 + 磁盘模型占用大小 |
removemacai off | 直接关闭(跳过状态概览) |
removemacai off --keep <功能> | 关闭除指定功能外的所有 AI 功能 |
removemacai off --dry-run | 仅预览变更,不执行任何操作 |
removemacai off --yes | 跳过确认提示,直接执行 |
removemacai revert | 撤销所有变更,恢复原状 |
removemacai features | 列出--keep支持的所有功能名称 |
🔍 执行前先查看状态:removemacai status
执行关闭操作前,建议先运行removemacai status,它会列出 13 个功能的开关状态,以及磁盘上 5 组模型各自的占用大小:
Features Siri and Siri AI off (locked) ChatGPT and other AI extensions off (locked) Writing Tools on Genmoji on Image Playground on ... Models on disk Apple Intelligence foundation models 2.1 GB Image and Genmoji models 1.4 GB Spatial Photos models 800 MB Photos Clean Up models 600 MB Xcode code completion models 1.8 GB Total 6.7 GB状态查询逻辑在 Commands.swift 的status()方法中,模型大小通过 Apple 的 asset service 实时查询。
🎯 --keep 参数:选择性保留 AI 功能
--keep让你只关闭不需要的功能,保留你仍在使用的那些。
如何查看可用功能名称
removemacai features输出(名称定义在 Catalog.swift):
siri Siri and Siri AI chatgpt ChatGPT and other AI extensions writing-tools Writing Tools genmoji Genmoji image-playground Image Playground mail Mail summaries and smart replies notification-summaries Notification summaries messages-summaries Messages summaries safari-summaries Safari summaries notes-summaries Notes transcription summaries inline-predictions Inline text predictions spatial-photos Spatial Photos photos-clean-up Photos Clean Up xcode-completion Xcode predictive code completion使用 --keep 保留指定功能
保留siri和writing-tools,关闭其余所有功能:
removemacai off --keep siri,writing-tools多个功能用英文逗号分隔,中间不加空格。如果传入不存在的名称,工具会报错并提示用removemacai features查看有效名称。
⚠️ --keep 对模型删除的关键影响
这是最容易被忽略的一点:模型文件只有在所有依赖它的功能都被关闭时才会被删除。
例如,writing-tools和image-playground都依赖foundation models。如果你用--keep image-playground保留了 Image Playground,那么 foundation models 和 image models 都不会被删除,磁盘空间无法释放。
这套依赖逻辑在 Catalog.swift 的setsToRemove()方法中实现:只有当某组模型的所有使用方功能都被关闭时,该组模型才会被纳入删除清单。
💡 建议:先用
removemacai off --dry-run --keep <功能>预览会删除哪些模型,确认磁盘释放量后再正式执行。
--keep 与配置文件的关系
执行off --keep时,RemoveMacAI 会生成一个系统配置文件(Profile.swift),将--keep的功能列表写入配置标记。下次运行status时,工具会自动识别该标记,将保留的功能显示为on,关闭的功能显示为off (locked)。
想改变--keep的列表?直接重新执行off并传入新的值即可,工具会自动替换旧配置。
🔬 --dry-run:安全预览所有变更,不改一行系统
--dry-run是"只看不改"模式,适合在执行前确认变更范围:
removemacai off --dry-run执行后你会看到:
- 即将关闭哪些功能(含
--keep的保留说明) - 即将删除哪些模型组,以及各自大小
- 生成的配置文件路径(临时目录下的
.mobileconfig文件) - 不会对系统做任何修改
Dry run, nothing changed. Profile it would install: /var/folders/.../RemoveMacAI.mobileconfig Models it would delete: com.apple.modelcatalog, com.apple.MobileAsset.UAF.FM.CodeLM预览逻辑在 Commands.swift 的off()函数中,会生成临时配置文件但不安装到系统。
💡
--dry-run可与其他参数自由组合,例如--dry-run --keep siri预览保留 Siri 时的变更范围。
⚡ --yes:跳过交互确认,适合自动化场景
默认情况下,removemacai执行前会询问"Turn Apple Intelligence off?"并等待按y确认。
--yes(简写-y)跳过这个提示,直接执行:
removemacai off --yes适用场景:
- 批量脚本自动化
- 非交互终端(SSH 会话、CI 脚本等)
注意:如果不加--yes且不在终端中运行,工具会报错退出并提示"run it in a terminal, or add --yes"(Commands.swift 第 120 行的isatty检测)。
🔗 三个参数组合使用:灵活控制每一步
| 使用场景 | 命令 |
|---|---|
| 预览关闭所有功能会删除什么 | removemacai off --dry-run |
| 保留 Siri 和邮件摘要,关闭其余 | removemacai off --keep siri,mail |
| 保留指定功能 + 预览(不改系统) | removemacai off --keep siri --dry-run |
| 完整自动化(脚本中静默执行) | removemacai off --keep siri,chatgpt --yes |
参数解析逻辑见 main.swift,--keep、--dry-run、--yes三个选项相互独立,可任意组合。
📝 常用功能名称速查表
--keep值 | 保留的功能 |
|---|---|
siri | Siri 语音助手、Hey Siri、菜单栏 Siri 图标 |
chatgpt | ChatGPT 及其他 AI 扩展 |
writing-tools | 文本写作工具(改写、润色、纠错) |
genmoji | Genmoji 表情生成 |
image-playground | Image Playground 图片生成 |
mail | 邮件摘要与智能回复 |
notification-summaries | 通知摘要 |
messages-summaries | 信息(短信)摘要 |
safari-summaries | Safari 网页摘要 |
notes-summaries | 备忘录转录摘要 |
inline-predictions | 行内文本预测 |
spatial-photos | 空间照片重拍功能 |
photos-clean-up | 照片智能清理 |
xcode-completion | Xcode 预测式代码补全 |
完整功能定义见 Catalog.swift。
↩️ 撤销所有变更:removemacai revert
无论用了什么参数组合,一条命令即可完全恢复:
removemacai revert它会打开系统设置,移除 RemoveMacAI 配置文件,所有功能恢复你之前的设置,macOS 会按需重新下载模型。
📁 相关文件路径
| 文件 | 说明 |
|---|---|
| main.swift | 参数解析与命令分发入口 |
| Commands.swift | off、status、revert核心执行逻辑 |
| Catalog.swift | 13 个功能清单与 5 组模型依赖关系定义 |
| Profile.swift | 系统配置文件生成与--keep标记写入 |
| README.md | 项目完整使用文档与 FAQ |
| install.sh | 一行安装脚本(自动校验 SHA-256) |
| CHANGELOG.md | 版本变更记录 |
【免费下载链接】RemoveMacAITurn off Apple Intelligence on macOS 27 and get its disk space back. One command, fully reversible.项目地址: https://gitcode.com/gh_mirrors/re/RemoveMacAI
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考