Green YGreck Guides FR
🍎 macOSIntermediate⏱ 10 min5 steps

Diskutil: list, verify and repair disks

The essential commands to inspect volumes.

  1. List disks and partitions:
    diskutil list
  2. See APFS containers and volumes:
    diskutil apfs list
  3. Verify the startup volume:
    diskutil verifyVolume /
  4. To repair the startup disk, restart in Recovery Mode and run "First Aid" in Disk Utility.
  5. Eject an external disk cleanly:
    diskutil eject /dev/disk4
⚠️ Never use diskutil eraseDisk or eraseVolume without checking the disk identifier with diskutil list.