macOS 27 废弃 hdiutil 命令
推荐指数 56.0 NO. 013 · 2025.08.21
发布2026/08/22Score183Comments81
为什么值得看
苹果在 macOS 27 Golden Gate 中正式弃用沿用 20 余年的磁盘镜像工具 hdiutil,全面迁移至 diskutil image。CI/CD 流水线、开发者脚本中大量依赖 hdiutil 的自动化操作需要重写,且部分参数如 -puppetstrings 已被移除。
编辑判断
这个改动波及面比表面大得多。hdiutil 是 macOS 自动化生态的隐形基础设施,从 Homebrew 安装包到 Xcode 构建脚本再到安全研究者的取证工具链,底层都调用了它。diskutil image 虽然功能覆盖大部分场景,但 -puppetstrings 的消失意味着需要机器解析进度的流水线必须重写交互逻辑。
更隐蔽的风险是 ASIF 格式仅限 diskutil image 支持,如果你维护着跨版本 macOS 的镜像文件,现在就要做格式兼容性测试。建议趁 beta 期用 otool 和 dtrace 扫一遍现有脚本里 hdiutil 的调用点,优先处理无人值守场景。
社区反馈
意见分歧 57 条评论
核心争论:苹果弃用命令行工具是渐进迁移还是习惯性破坏向后兼容
相关内容
macOS 27 弃用 hdiutil,diskutil 接棒 hdiutil 在 macOS 27 Golden Gate 正式弃用,苹果建议转向 diskutil image。新工具速度更快、镜像更小,但缺乏自动认证机制,遇 root 权限文件直接报错。 hdiutil is deprecated in macOS 27 Golden Gate Jeff Johnson 分析 hdiutil 弃用,引用 macOS 27 最新 man 手册中 WHAT'S NEW 章节内容。 HDIUTIL(1) 手册页 记录 hdiutil 历史弃用项:macOS 12 弃用 UDBZ 格式和分段镜像,macOS 13 移除加密编码版本选项。
Was the error visible somewhere through Console.app? This is a major annoyance for me with Cocoa/AppKit apps that basically have terminal usage secondary.
Given xip has been deprecated for a long time now, yet still is the format Xcode is distributed in, I highly doubt hidutil will ever disappear from macOS. Apple just won’t really update it anymore, just like they haven’t changed xip (not like hidutil has seen any significant changes, but still)
Agreed. seatbelt/sandbox-exec has been “deprecated” for many, many years yet it still underlies all of the system’s sandboxing and Claude et al. use it for their own sandboxes. (And so do I — writing seatbelt rules is the only chance I get to write lisp-flavored anything these days.)