How to claim free disk space in APFS after deletion of huge amount of files? [duplicate]
Solution 1:
Okay, I can answer by myself.
In further investigation I came across the hidden space called local snapshot space that is caused by local time machine snapshots and tried to purge them for giving back at least 100 GB:
♠ sudo tmutil thinlocalsnapshots / 100g 1
Password:
Thinned local snapshots:
com.apple.TimeMachine.2019-12-07-134712.local
com.apple.TimeMachine.2019-12-07-134712.local
Although some snapshots should have been deleted, nothing happened in order to show more free disk space. I increased the argument to 110g
and now at least 72 GB was released and show up as free disk space.
I plaid a bit with separate values, found a tool called Daisy Disk that is able to show the size of hidden spaces.
I tried to remove all these local snapshots with
tmutil deletelocalsnapshots /
and it seems to remove them. At the end there are still 50 GB of hidden spaces left according to Daisy Disk that I am unable to find their location at the moment.
It seems that under the hood APFS would care by itself to free up this space if required. However, the UX around all this is as bad as possible and a huge black box from the perspective of a user.