macOS 关闭软件更新提醒的终极方案
背景¶
macOS 会不定期弹出“有更新项目,你要今晚安装这些更新吗?”的提醒。即使已经在“系统设置 → 通用 → 软件更新 → 自动更新”中关闭自动下载和自动安装,系统仍可能继续检查更新并展示提醒。
目标是:
- 不再出现软件更新弹窗、声音和角标;
- 不自动下载或安装 macOS 更新;
- 保留“系统设置 → 通用 → 软件更新”中的手动更新能力。
为什么关闭自动更新后仍然会提醒¶
“自动安装”和“自动检查/通知”不是同一层功能。关闭自动下载、自动安装,只代表系统不会自行完成更新;当后台检测到新版本时,SoftwareUpdateNotificationManager 仍可能展示通知。
在较新的 macOS 版本中,旧命令:
sudo softwareupdate --schedule off
可能仍然返回:
Automatic checking for updates is turned on
这表示系统没有接受关闭自动检查的请求。直接修改偏好值也不一定能改变系统更新守护进程的实际行为。
尝试过但不够可靠的方法¶
1. 只关闭系统设置中的自动更新¶
应当先关闭以下选项,避免后台下载和安装:
- 下载可用的更新;
- 安装 macOS 更新;
- 安装系统数据文件和安全性更新。
但这些选项不能保证关闭更新提醒。
2. 禁用提醒 LaunchAgent¶
提醒进程的标识符是:
com.apple.SoftwareUpdateNotificationManager
可以尝试:
launchctl disable "gui/$(id -u)/com.apple.SoftwareUpdateNotificationManager"
验证禁用记录:
launchctl print-disabled "gui/$(id -u)" | grep SoftwareUpdateNotificationManager
预期结果:
"com.apple.SoftwareUpdateNotificationManager" => disabled
问题在于:已经运行的 Apple 系统进程受 SIP(系统完整性保护)限制,即使使用 sudo launchctl kill,也可能返回:
Not privileged to signal service.
因此,这种方法可以作为辅助措施,但不适合单独作为最终方案。不要为了终止提醒进程而关闭 SIP,这会明显降低系统安全性。
最终方案:安装通知设置描述文件¶
macOS 支持通过 com.apple.notificationsettings 配置描述文件管理指定 App 的通知。针对更新提醒进程关闭通知,不会影响软件更新本身,也不会阻止手动检查更新。
创建一个扩展名为 .mobileconfig 的文件,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>NotificationSettings</key>
<array>
<dict>
<key>AlertType</key>
<integer>0</integer>
<key>BadgesEnabled</key>
<false/>
<key>BundleIdentifier</key>
<string>com.apple.SoftwareUpdateNotificationManager</string>
<key>CriticalAlertEnabled</key>
<false/>
<key>NotificationsEnabled</key>
<false/>
<key>ShowInLockScreen</key>
<false/>
<key>ShowInNotificationCenter</key>
<false/>
<key>SoundsEnabled</key>
<false/>
</dict>
</array>
<key>PayloadDisplayName</key>
<string>关闭 macOS 软件更新提醒</string>
<key>PayloadIdentifier</key>
<string>local.notifications.software-update</string>
<key>PayloadType</key>
<string>com.apple.notificationsettings</string>
<key>PayloadUUID</key>
<string>53A3BA1D-9E20-46CF-A3F7-2F4D1D11DBF4</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</array>
<key>PayloadDescription</key>
<string>关闭软件更新提醒的通知、声音和角标,不影响手动检查或安装 macOS 更新。</string>
<key>PayloadDisplayName</key>
<string>关闭 macOS 软件更新提醒</string>
<key>PayloadIdentifier</key>
<string>local.disable-software-update-notifications</string>
<key>PayloadOrganization</key>
<string>本机个人配置</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadScope</key>
<string>User</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>7692C492-2E8E-49AA-B245-059129E95C11</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
如果要在多台设备分别创建文件,建议为两个 PayloadUUID 生成新的 UUID:
uuidgen
uuidgen
安装步骤¶
- 双击
.mobileconfig文件。 - 打开“系统设置 → 通用 → 设备管理”。
- 选择“关闭 macOS 软件更新提醒”。
- 点击“安装”,确认安装该本地个人配置。
- 注销或重启一次 Mac,让已经运行的旧提醒进程退出。
用户范围的通知配置不一定要求输入管理员密码。是否出现密码提示,不是判断安装成功与否的依据。
如何确认配置已生效¶
在“系统设置 → 通用 → 设备管理”中打开该配置,确认:
- 标识符为
com.apple.SoftwareUpdateNotificationManager; - “通知已启用”为
False; - “在锁定屏幕上显示”为
False; - “提醒类型”为“无”;
- 声音和角标处于关闭状态。
已有弹窗可能不会立即自动消失,可以手动关闭一次。注销或重启后,后续提醒应被配置阻止。
如何恢复更新提醒¶
进入“系统设置 → 通用 → 设备管理”,选中“关闭 macOS 软件更新提醒”,然后移除配置即可。
如果此前还执行过 LaunchAgent 禁用命令,可恢复为:
launchctl enable "gui/$(id -u)/com.apple.SoftwareUpdateNotificationManager"
注销或重启后生效。
注意事项¶
- 不建议关闭 SIP 来处理普通通知问题。
- 描述文件只控制提醒的展示,不会阻止手动更新。
- 系统大版本升级可能调整更新组件或重置部分设置,升级后应重新检查配置是否仍然生效。
- 安全更新具有实际价值。即使关闭提醒,也建议定期手动检查并选择合适时间安装。