Verify and Repair a Volume with diskutil

Run Disk Utility's First Aid from the Terminal — check a volume's filesystem and fix errors without the GUI.

macOSfilesystemrepairdiskutilMedium risk
Run `diskutil verifyVolume /dev/diskXsY` to check a volume, then `sudo diskutil repairVolume /dev/diskXsY` to repair it.

01Command

Command
$ diskutil verifyVolume /dev/disk3s1

02What it does

verifyVolume walks the volume's filesystem structures and reports corruption without changing anything; repairVolume then applies the same logic Disk Utility's First Aid uses. `diskutil info /dev/diskXsY` first shows the identifier, mount state, and APFS role so you act on the right volume. For the startup volume itself, run repair from macOS Recovery, because the live APFS snapshot cannot always be fixed while booted.

03Risk

RiskMedium risk
!Warning: If repair reports errors it cannot fix, copy your data off the volume before it degrades further.

04Undo

Undo
$ sudo diskutil repairVolume /dev/disk3s1

05Sources

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions