How to delete Time Machine local backups on High Sierra

user1234

macrumors 6502a
Original poster
Mar 3, 2009
621
358
Sweden
I discovered today that "System" was using 200GB of space on my 500GB internal SSD on my iMac. I realised that Time Machine local backups was re-enabled when I upgraded to High Sierra, and the tmutil disablelocal command is no more.

One way to fix it would probably be to let Time Machine complete a backup to it's destination, but here's how to delete local backups in High Sierra.

PLEASE NOTE THAT THIS MAY OR MAY NOT AFFECT TIME MACHINES ABILITY TO BACK UP PROPERLY. DO THIS AT YOUR OWN RISK.

First open terminal then find out the volume used by Time Machine local backups:
Code:
df -h
For me it was /Volumes/com.apple.TimeMachine.localsnapshots and it probably is for you too, but it never hurts to confirm it.


Then list local snapshots:
Code:
tmutil listlocalsnapshotdates /Volumes/com.apple.TimeMachine.localsnapshots

Use tmutil deletelocalsnapshots to delete them, followed by the date of the snapshot:
Code:
tmutil deletelocalsnapshots YYYY-DD-MM-HHMMSS
Example: tmutil deletelocalsnapshots 2017-09-30-191318

Repeat until they are all gone. This did free up the space for me.
 

mayuka

macrumors 6502a
Feb 15, 2009
583
61
I had some trouble with too less free space. Deleting local snapshots free'd up some space. Many thanks for discovering.

However, is there a way to disable local snapshots altogether?

In earlier versions this could be done with

Code:
tmutil disablelocal
but this option is no longer available.
 

gages

macrumors regular
Sep 25, 2016
111
32
I have an external time capsule and an internal APFS volume. I use timemachineditor to backup once per day. When the external time machine backup kicks off, the local snapshot gets updated and the prior one deleted.

tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-10-11-020452

Anyway to control this behavior?

Timemachineeditor has been updated with some new local snapshot features

https://tclementdev.com/timemachineeditor/
 

mayuka

macrumors 6502a
Feb 15, 2009
583
61
Well, at least with the normal Time Machine backup, local snapshots are not deleted when the TM backup to the external drive has been finished.

The only thing that would come into my mind would be to create a cron-job that deletes the local snapshots once a day or so...
 

gages

macrumors regular
Sep 25, 2016
111
32
So I emailed with the guy who writes timemachineeditor. He states:

That's part of Apple's Time Machine. They are now creating a local snapshot and using that snapshot as the data source to create a regular backup, rather than using the live disk as the source (as is the case with an HFS disk).
 

user1234

macrumors 6502a
Original poster
Mar 3, 2009
621
358
Sweden
I had some trouble with too less free space. Deleting local snapshots free'd up some space. Many thanks for discovering.

However, is there a way to disable local snapshots altogether?

In earlier versions this could be done with

Code:
tmutil disablelocal
but this option is no longer available.
I have not found a way to do this. The great thing though is that with APFS a snapshot should only take up space for what is different between a snapshot and the volume. The not so great part is that I had 100 GB of temporary data that time machine started to backup, and deleting this temporary data did not stop the backup since it was all in the snapshot. I had to manually deal with that.
 

Honza1

macrumors 6502
Nov 30, 2013
460
158
US
So I emailed with the guy who writes timemachineeditor. He states:

That's part of Apple's Time Machine. They are now creating a local snapshot and using that snapshot as the data source to create a regular backup, rather than using the live disk as the source (as is the case with an HFS disk).
That explains it! I was wondering why - now in HS - when I connect TimeMachine disk (I use two - one at work and one at home) the backup starts very quickly after connecting and is done in short time - before in Sierra system always had to go through a long "preparing..." step. This seems better...
 
  • Like
Reactions: tomjleeds

gaedfly

macrumors 6502
Sep 12, 2014
288
234
That explains it! I was wondering why - now in HS - when I connect TimeMachine disk (I use two - one at work and one at home) the backup starts very quickly after connecting and is done in short time - before in Sierra system always had to go through a long "preparing..." step. This seems better...
It might be better when time machine works. Local snapshots aren’t supposed to take up a lot of space and are only supposed to be stored on a drive with plenty of space. In my case time machine created about half a dozen local snapshots in 2 days, taking my 1TB SSD from 755GB free space to 50GB. This might be because despite working for hours with Apple and Eero to use my time capsule in bridge mode only as a network backup drive most of the backups failed. It took me all day to figure out where the free space went. A senior advisor at Apple tried to help but said time machine couldn’t be the culprit. Thankfully I found a post here about deleting local snapshots using tmutil. Now I’m back to 700 + GB free and my system folder went from 700GB to 50. I’m switching to Carbon Copy Cloner, which won’t dump hidden files onto my SSD, a proprietary action I can’t disable.
 

mcglk

macrumors newbie
Jan 4, 2018
1
0
Seattle, WA
It might be better when time machine works. Local snapshots aren’t supposed to take up a lot of space and are only supposed to be stored on a drive with plenty of space. In my case time machine created about half a dozen local snapshots in 2 days, taking my 1TB SSD from 755GB free space to 50GB. This might be because despite working for hours with Apple and Eero to use my time capsule in bridge mode only as a network backup drive most of the backups failed. It took me all day to figure out where the free space went. A senior advisor at Apple tried to help but said time machine couldn’t be the culprit. Thankfully I found a post here about deleting local snapshots using tmutil. Now I’m back to 700 + GB free and my system folder went from 700GB to 50. I’m switching to Carbon Copy Cloner, which won’t dump hidden files onto my SSD, a proprietary action I can’t disable.
If it helps any, I found the following helpful:

Code:
$ tmutil thinlocalsnapshots /Volumes/com.apple.TimeMachine.localsnapshots
Thinned local snapshots:
2017-12-23-194132
2017-12-24-003305
2017-12-24-044458
2017-12-24-052058
. . .
$ _
 

zezee3

macrumors newbie
Jul 11, 2015
12
0
Virginia, USA
I have an external time capsule and an internal APFS volume. I use timemachineditor to backup once per day. When the external time machine backup kicks off, the local snapshot gets updated and the prior one deleted.

tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-10-11-020452

Anyway to control this behavior?

Timemachineeditor has been updated with some new local snapshot features

https://tclementdev.com/timemachineeditor/
[doublepost=1516989084][/doublepost]Thank you for posting the Time Machine Editor. I installed it and it is working great.
 

apmu

macrumors newbie
Dec 7, 2012
2
1
Thanks a lot for this!! Really solved a lot of problems.

I should learn more how to use terminal more efficiently
If you only want to delete some of the snapshots...

tmutil listlocalsnapshotdates /Volumes/com.apple.TimeMachine.localsnapshots

Copy and paste the snapshot dates you want deleted into a file called tmp.txt and put it on the Desktop of your Mac. One date per line.

Then in Terminal.app, run:

cd ~/Desktop
for i in `cat tmp.txt`; do tmutil deletelocalsnapshots $i; done
 
  • Like
Reactions: lpuerto

lpuerto

macrumors member
Mar 4, 2014
51
10
Europe
If you only want to delete some of the snapshots...

tmutil listlocalsnapshotdates /Volumes/com.apple.TimeMachine.localsnapshots

Copy and paste the snapshot dates you want deleted into a file called tmp.txt and put it on the Desktop of your Mac. One date per line.

Then in Terminal.app, run:

cd ~/Desktop
for i in `cat tmp.txt`; do tmutil deletelocalsnapshots $i; done
this is a great idea also :)
 

cool11

macrumors 65816
Sep 3, 2006
1,481
129
Please tell me a permanent way to completely disable the automatic creation of TM snapshots.
Needless to say I never use TM, and and TM is disabled in System Preferences.
But each day a new snapshot is created and I have to manually delete it.
Can we stop this once and for all?
 
  • Like
Reactions: !!!

msephton

macrumors 6502
Jan 6, 2004
318
141
Cornwall, UK
This behaviour is making my otherwise fine setup feel like molasses. Each backup consumes up to 8GB of Virtual Memory, causing causing massive slowdown as you'd imagine. It wasn't like this until a few point updates ago.

Trying TimeMachineEditor and crossing my fingers.
 

cool11

macrumors 65816
Sep 3, 2006
1,481
129
I can't believe that there is no way to stop the automatic creation of TM images, even when a user has TM disabled! It is crazy!
 

aussie_geek

macrumors 65816
Apr 19, 2004
1,092
0
Sydney Australia
Need some automation in this process. Put it in Terminal or create a script with Automator:
Code:
tmutil  listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
ATOMIC SCRIPT! Epic... Nice one!

Puts your Mac in a state ready for a backup before you connect your Time Machine.
 
Last edited:

cool11

macrumors 65816
Sep 3, 2006
1,481
129
Need some automation in this process. Put it in Terminal or create a script with Automator:
Code:
tmutil  listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
Can somebody create the script and tell how to put it on daily schedule?
 

gctwnl

macrumors regular
Jan 4, 2005
185
43
The Netherlands
Need some automation in this process. Put it in Terminal or create a script with Automator:
Code:
tmutil  listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
Wouldn't this delete the local snapshot that Time Machine is using to create the external one? Shouldn't you delete all but the most recent one to be sure you do not damage your external backup? After all, the current TM first creates the local snapshot and then moves that to the dedicated Time Machine volume.disk.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
29,632
9,256
California
Wouldn't this delete the local snapshot that Time Machine is using to create the external one? Shouldn't you delete all but the most recent one to be sure you do not damage your external backup? After all, the current TM first creates the local snapshot and then moves that to the dedicated Time Machine volume.disk.
I don't believe that is how these local snapshots work. It does not appear they get moved or backed up to the TM disk at all. They are just a second way for you to get to deleted data that may not have been backed up to a TM disk.
 
  • Like
Reactions: BigMcGuire

user1234

macrumors 6502a
Original poster
Mar 3, 2009
621
358
Sweden
The local snapshots screwed me over today.

Finder reported 80 GB free, but VMware Fusion refused to boot a VM because there was no space available. Sure enough, I had 70+ GB of snapshots taking up space that Finder didn't report, and the automatic management that Apple claims is there didn't do anything to free up space on the fly either.

My iMac desktop computer is always connected to ethernet and is backing up to a NAS every hour. I don't need any local snapshots to be stored. It's ridiculous that it can't be turned off.
 
  • Like
Reactions: !!!

vbctv

macrumors 6502
Sep 25, 2013
492
245
Cleveland, OH
It seems if you uncheck the Auto Backup option in the Time Machine settings that it stop the local backups. I have zero local backups currently and have the auto backup option turned off... I think that's a new feature in Mojave because I don't remember the check mark option in High Sierra...