9

Listing local snapshots yields this

> tmutil listlocalsnapshots /
com.apple.TimeMachine.2018-01-30-194719
com.apple.TimeMachine.2018-01-30-211627
com.apple.TimeMachine.2018-01-30-224917
com.apple.TimeMachine.2018-01-30-234619
com.apple.TimeMachine.2018-01-31-014151
com.apple.TimeMachine.2018-01-31-024107
com.apple.TimeMachine.2018-01-31-034442
com.apple.TimeMachine.2018-01-31-044108
com.apple.TimeMachine.2018-01-31-054441
com.apple.TimeMachine.2018-01-31-064120

and i try to delete a local snapshot but running this

> sudo tmutil deletelocalsnapshots 2018-01-30-194719
Deleted local snapshot '2018-01-30-194719'

but listing the local snapshots again showed that the snapshot has not been removed

> tmutil listlocalsnapshots /
com.apple.TimeMachine.2018-01-30-194719
com.apple.TimeMachine.2018-01-30-211627
com.apple.TimeMachine.2018-01-30-224917
com.apple.TimeMachine.2018-01-30-234619
com.apple.TimeMachine.2018-01-31-014151
com.apple.TimeMachine.2018-01-31-024107
com.apple.TimeMachine.2018-01-31-034442
com.apple.TimeMachine.2018-01-31-044108
com.apple.TimeMachine.2018-01-31-054441
com.apple.TimeMachine.2018-01-31-064120

Just for fun i wrote a little bash script to delete them all (which also avoids any typos).

for date in $(tmutil listlocalsnapshots / | perl -pe 's/com.*(2018.*)/\1/'); do echo "deleting $date"; sudo tmutil deletelocalsnapshots "$date";  done

Strangely enough, i can repetitively run that command above and it will always show the same output:

deleting 2018-01-30-194719
Deleted local snapshot '2018-01-30-194719'
deleting 2018-01-30-211627
Deleted local snapshot '2018-01-30-211627'
deleting 2018-01-30-224917
Deleted local snapshot '2018-01-30-224917'
deleting 2018-01-30-234619
Deleted local snapshot '2018-01-30-234619'
deleting 2018-01-31-014151
Deleted local snapshot '2018-01-31-014151'
deleting 2018-01-31-024107
Deleted local snapshot '2018-01-31-024107'
deleting 2018-01-31-034442
Deleted local snapshot '2018-01-31-034442'
deleting 2018-01-31-044108
Deleted local snapshot '2018-01-31-044108'
deleting 2018-01-31-054441
Deleted local snapshot '2018-01-31-054441'
deleting 2018-01-31-064120
Deleted local snapshot '2018-01-31-064120'

Why are my snapshots not deleting? I am quite low on storage space (13gb of space - the snapshots would not even clear when i had 2gb of free space left)

0

2 Answers 2

6

Great solution detecting that the filesystem was corrupt when the normal commands were note working. Also note, you can avoid iterating on the list of snapshots and just direct the system to reclaim space up to and surpassing the limit you choose:

tmutil thinlocalsnapshots / $(echo "5 * 1000000000" | bc) 2

The above command asks for 5 GB of cleaning. I chose the echo math to make it easy to dial up and down without the long string of zeroes getting changed. Feel free to simplify the above command with a number you like that’s larger than your drive if you intend the system clean all possible snapshots.

How to thin your local Time Machine Snapshots on macOS High Sierra

1
  • 1
    Thanks for this! I used it on 10.14.6 (Mojave), tmutil thinlocalsnapshots / 2000000000000 2 (That's 2 followed by 12 zeros, so 2TB). It got rid of all the local snapshots and freed up 130GB of disk space! This resolved my annoyance and confusion when I deleted 100+GB of files and my available disk space did not change.
    – bdemarest
    Feb 4, 2020 at 5:19
5

I think the least-recent time machine snapshots was corrupted - potentially from some system crashes caused by APFS bugs.

I tried running DIsk Utility's first aid, but that froze my computer for over 3 hours (maybe it ran out of space to work with?) - I ended up having to force-restart.

I solved the problem by running first aid booted from an external hard drive install of High Sierra. It removed some old snapshots. I then was able to boot from my normal drive and run tmutil deletelocalsnapshots... which successfully deleted the snapshots and freed up space

2
  • Wouldn't it be good if you could just do this from Recovery... but tmutil doesn't exist in Recovery :/
    – Tetsujin
    Jul 26, 2018 at 12:00
  • 1
    Just adding that if your interrupt (CTRL+C) tmutil deletelocalsnapshots __SOME_DATE__, tmutil listlocalsnapshots / will tell you it is still here. And you won't be able delete it (still saying it is here). So just reboot your Mac then tmutil deletelocalsnapshots __SOME_DATE__ will work.
    – MacKentoch
    Mar 18, 2019 at 8:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .