MacOS – Deleting files and empty trash does not increase free space

catalinadisk-utilitymacosstorage

I have a MacBook Air running macOS Catalina 10.15, upgraded from an older version.

There's only a few 10s of megabytes free on the disk, but deleting files and emptying the trash doesn't change the amount of free space.

I've tried:

  • looking for time machine snapshots that can be deleted, but there do not seem to be any (tmutil listlocalsnapshots /System/Volumes/Data does not show any snapshots to remove)
  • running disk utility first aid after booting in recovery mode on the Macintosh HD – Data partition. This produces an error…

    Checking snapshot 1 of 2 (com.apple.apfs.purgatory.115b2)
    error: btn: invalid key order (1) oid 1742762 / oxid 0 / level 2 / flags 0x1
    previous key:  [...]
    current key [...]
    next key [...]
    snapshot invalid
    the volume /dev/rdisk1s1 could not be verified completely```
    
  • disabling SICP using csrutil disable and rebooting

  • running fsck in single user mode:
    • fsck -f which yields:
      error: container /dev/rdisk1 is mounted with write acess
      but trying to umount /dev/rdisk1 tells me that /dev/rdisk1 is not currently mounted.
    • Running fsck -f /dev/rdisk1s1 produces the same message.
    • same with running fsck_apfs -f /dev/rdisk1s1

I'm about at my wits end here. Anyone have suggestions for further things to try?

Best Answer

The disk utility error is the main issue you face.

  1. Make sure your important files are backed up.
  2. Boot to internet recovery or an external drive so you can re-run Disk Utility not from the booted container. If you can't clear the errors or flush all the snapshots and get a clean run - it's time to erase and reinstall.

Also - you'll want to remove snapshots from all of your volumes - not just /System. find all your volumes on the synthesized volume and check them with diskutil instead of tmutil

diskutil list
diskutil apfs listsnapshots disk1s1

As for the end result - you'll get the most space back deleting the apfs snapshots against /System/Volumes/Data as you mentioned in your post:

diskutil apfs listsnapshots /System/Volumes/Data
diskutil apfs deleteSnapshot disk1s1 -name com.apple.TimeMachine.2019-12-27-124916.local