Drive space not recovered after unsync on Mac

For anyone else hitting this, the cause of this issue ended up being the Time Machine local snapshots. This page has more information on what those are: https://support.apple.com/en-us/HT204015
Even though unsync was freeing up the space that these files were taking, the local snapshots were “protecting” this data.

  • The command:
    tmutil listlocalsnapshots /
    will list the local snapshots on the system

  • The command:
    tmutil thinlocalsnapshots / 100000000000 1
    is supposed to “intelligently” prune the local snapshots to free up the designated space. In this case approximately 100GB. However, we found that it doesn’t seem to work as well as we had hoped.

  • The command:
    tmutil listlocalsnapshotdates / | grep 20 | while read f; do tmutil deletelocalsnapshots $f; done
    will delete each local snapshot, explicitly, to ensure that they are all removed and free up the local space on the disk.