Mac 更新后变卡:用终端诊断和修复
macOS 更新后系统变慢的排查指南:检查磁盘、修复文件系统、排查后台进程、重建 Spotlight 索引并确认更新状态。
快速开始
如果你的 Mac 在 macOS 更新后突然变卡,常见原因包括 Spotlight 索引损坏、更新留下的文件系统错误,或后台进程卡在异常状态。按顺序执行以下步骤:先诊断,再修复,最后验证。
症状
先看清磁盘和分区
系统更新后变卡,很多时候根源在存储:卷快满了或者状态异常。第一步先把所有已连接的磁盘、分区和挂载名列出来,找到系统卷对应的标识(例如 /dev/disk3s1),后面要用到。能看到一份包含启动卷的清晰列表,就说明这一步完成了。
一条命令在终端里查看所有内置和外置磁盘、分区以及对应的 /Volumes 名称。
$ diskutil list检查文件系统有没有错误
更新中断或失败可能留下文件系统错误,让整个系统都变慢。对上一步找到的卷跑一次校验,这一步是只读的、安全的。如果校验报错,就按指南给出的修复命令执行,然后再校验一次,直到结果干净为止。
在终端运行磁盘工具的急救功能——检查文件系统并修复错误,无需打开图形界面。
$ diskutil verifyVolume /dev/disk3s1▾ 撤销
$ sudo diskutil repairVolume /dev/disk3s1排查会话里在跑什么
更新有时会把用户代理进程卡住或陷入反复崩溃,偷偷占用 CPU。列出当前 launchd 用户代理,重点看 PID 为 0 或上次退出状态非零的条目——这些就是异常的。发现可疑项后记下它的标签;最省事的办法是注销再登录,重启整个会话。
用 launchctl list 列出用户域内所有代理的标签、PID 和上次退出状态,排查多余的后台程序。
$ launchctl list | head -30重建 Spotlight 索引
更新后变卡最常见的原因就是 macOS 在后台重建索引,或者索引在更新中途损坏了。删掉 Spotlight 数据库让它从头重建。期间 mds_stores 等 CPU 占用偏高属正常现象。等索引建完、搜索结果恢复正常,就说明成功了。
确认没有待安装的后续更新
更新刚完成时的卡顿,有时是苹果随后发布的补丁才修复的。用 softwareupdate 列出可用更新并安装适用于本机的部分。当它提示没有待装更新时,说明系统已经完全打上补丁,前面的修复措施也能在干净的基础上发挥作用。
使用 macOS 内置的 softwareupdate 命令行工具,无需打开系统设置即可列出、下载并安装苹果软件更新。
$ softwareupdate -l -i -a --list-full-installer-versions如何确认已解决
重建 Spotlight 并装完待装更新后,日常使用应当恢复流畅:应用能迅速打开,索引建完后系统活动也会平静下来。
一键全部撤销
上面每一条命令都可以撤销。按此顺序执行即可全部还原。
$ sudo diskutil repairVolume /dev/disk3s1执行前请先确认——部分步骤之间可能并非相互独立。
来源
- DISKUTIL(8) - macOS manual page依据: The manual page text contains 'diskutil list' describing it as listing disks with their partitions and identifiers such as disk0s1.
- diskutil - Modify, verify and repair local disks依据: Documents the diskutil command with 'list' as its first documented verb for listing disks, including the 'diskutil list' syntax shown on the page.
- System Information User Guide for Mac - Apple Support依据: Apple's reference for inspecting disks and volumes on macOS, including First Aid-style diagnostics.
- launchctl - Interfaces with launchd to manage services依据: Documents `launchctl list`: 'List all of the jobs loaded in their own domain' with PID, status and label columns; run without sudo it lists your user domain.
- launchctl(1) man page依据: Man page for launchctl: the `list` subcommand prints the label, PID (or '-' if not running) and last exit status of each service in the caller's domain.
- SoftwareUpdate Command: How to update software in macOS依据: Documents softwareupdate -l to list, -i -a to install all available updates, and related flags.
- Update macOS on Mac - Apple Support依据: Apple's guide to updating macOS; the Software Update mechanism behind the CLI is documented here.
- macOS mdutil command reference依据: mdutil -E erases and rebuilds the Spotlight index store for the specified volume or directory.
最后验证: 2026-09-21