Skip to content

Instantly share code, notes, and snippets.

@varahash
varahash / gist:9fc02e5b88c3259796e7b740b1963202
Created November 15, 2020 15:08
Repair APFS 'warning: overallocation detected on Main device'
1. Boot into Recovery mode (by pressing CMD+R while boot macOS)
2. Unmount APFS volumes automaticaly mounted by Recovery (where /dev/disk2 is your APFS container)
$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
3. Unlock APFS volumes (in case FileVault enabled for this volume)
$ diskutil apfs unlockVolume /dev/disk2s1 -nomount