I had a weird issue on y MacBook today: after being low on space for what felt like months, I bit the bullet and deleted 50% of stuff from hard disk. I freed up about 250GB of files, emptied the trash, and checked under About this Mac – Storage. Sure enough, I finally had space again.
But when I tried to install something, which instantly told me I only had 14GB available, and that’s just not enough. I thought, “pardon?” ?
I double-checked on the command line with df -h, and the output corroborated the statement of the application I wanted to install: 98% disk space used. I thought perhaps Disk Utility would bring clarification, perhaps via a First Aid run. But sadly it only confirmed what the df command saw: my disk was nearly full, and whatever 250GB I had deleted were somehow still lurking around. How? Why? What was going on here?
Thankfully I found this StackExchange thread discussing the same issue. Apparently this weirdness is caused by local Time Machine backups that have not been relayed to an external disk. I do recall that my MacBook has been telling me that no backups could be made for some time. Either way, the magic command looks like this:
tmutil thinlocalsnapshots / 1000000000000 1
No administrator privileges are necessary. It takes a moment to run, but apparently this radically clears up local backups. I had this problem with macOS 10.13.6 High Sierra. Maybe this helps anyone with similar issues.
Thanks to Tetsujin for making this excellent suggestion.
The Mac utility Onyx can also perform this function.
https://www.titanium-software.fr/en/index.html
I really don’t understand the point of TimeMachine local backups.
If my local drive dies, i’m screwed.
if i’m using an external Time Machine drive, why do I need TimeMachine local backups?
Note well that external drives will also store their own local backups and use up that space arbitrarily.
I use this command for my internal drive
tmutil listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
And this for my external (named xternl)
tmutil listlocalsnapshotdates /Volumes/xternl |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
Thank you so much for sharing, I appreciate this. I do like TimeMachine, but every once in a while it has a hissy-fit. My favourite is the “sorry you’ll have to re-create the whole backup” message.
From what I understand about the local backups, they’re enabled on laptops by default. In case you’re not on your local network, backups are made on the go, and they should all be transferred to the TimeMachine when you’re back home. Doesn’t always work of course. On desktop models this feature is disabled by default. I seem to recall that “tmutil disablelocal” will switch them off for good.
https://support.apple.com/en-us/HT204015
unfortunately, when I enter the command
tmutil disablelocal
the system returns
disablelocal: Unrecognized verb.
this on MacOS 10.14.6
I’m thinking of setting up a cron job to run on the half hour to purge the local backups.
Ah same for me, apparently the command was removed in 10.13. I wonder why they did that? I guess that’s Apple: “we make the choices, NOT the users”. The cron job is probably a good idea if the local backups are causing you trouble. I’ve just checked on my Mac Mini but I didn’t have any at the moment. Only my MacBook seems to accumulate them from time to time.