Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lainvoo

macrumors newbie
Original poster
Sep 27, 2017
7
30
After upgrading to High Sierra the "System" storage was 260GB (About This Mac -> Storage). I also used DaisyDisk to confirm that there were "200GB of hidden system files" that can't be shown or deleted.

Turned to our good friend Google and I found that Time Machine local backups were the reason and 'sudo tmutil disablelocal' command was supposed to help, if only "disablelocal" verb had not been removed from High Sierra. So back to square one.

Did some digging a.k.a. opened the manual for tmutil. I found that there were two useful verbs "listlocalsnapshots" and "deletelocalsnapshots". Used the first one to get the exact date stamps required for the second one and deleted all local snapshots manually.

Result: "System" went from 260GB to 60GB.

Step by step I went as following:
Code:
sudo tmutil listlocalsnapshots /
This resulted:
Code:
com.apple.TimeMachine.2017-09-27-005259
com.apple.TimeMachine.2017-09-27-104645
com.apple.TimeMachine.2017-09-27-114218
com.apple.TimeMachine.2017-09-27-124220
I took these four date stamps and followed the next command with each as following:
Code:
tmutil deletelocalsnapshots 2017-09-27-005259

So in the end if i double checked with
Code:
sudo tmutil listlocalsnapshots /
there were no snapshots and after checking "About This Mac -> Storage" I was happy :)

Hope this helps!
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,137
15,602
California
Thanks for the research and your post. After reading your comment, I dug around some more and read the man pages.

I found this post by @oatman13 with the command below to thin those local snapshots.

Code:
sudo tmutil thinLocalSnapshots / 10000000000 4

That 10000000000 there is how much you want to thin in bytes (so about 9GB). I tested the command and the
listlocalsnapshots as you suggested before and after and this completely removed all the snapshots from my MacBook. I suppose if you had more than ~9GB you could stick another zero on that command to make it ~90GB.

At any rate the thinLocalSnapshots command removes them all with one command.

Edit: I also found this command that will remove them all.

Code:
tmutil  listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
 
Last edited:

cabrown

macrumors regular
Sep 2, 2008
126
36
After upgrading to High Sierra the "System" storage was 260GB (About This Mac -> Storage). I also used DaisyDisk to confirm that there were "200GB of hidden system files" that can't be shown or deleted.

Turned to our good friend Google and I found that Time Machine local backups were the reason and 'sudo tmutil disablelocal' command was supposed to help, if only "disablelocal" verb had not been removed from High Sierra. So back to square one.

Did some digging a.k.a. opened the manual for tmutil. I found that there were two useful verbs "listlocalsnapshots" and "deletelocalsnapshots". Used the first one to get the exact date stamps required for the second one and deleted all local snapshots manually.

Result: "System" went from 260GB to 60GB.

Step by step I went as following:
Code:
sudo tmutil listlocalsnapshots /
This resulted:
Code:
com.apple.TimeMachine.2017-09-27-005259
com.apple.TimeMachine.2017-09-27-104645
com.apple.TimeMachine.2017-09-27-114218
com.apple.TimeMachine.2017-09-27-124220
I took these four date stamps and followed the next command with each as following:
Code:
tmutil deletelocalsnapshots 2017-09-27-005259

So in the end if i double checked with
Code:
sudo tmutil listlocalsnapshots /
there were no snapshots and after checking "About This Mac -> Storage" I was happy :)

Hope this helps!

THANK YOU SO MUCH!:):) I have been searching for days for a solution to no avail, This finally worked. I have no idea why they removed the "disablelocal" shame. Very much helps for making this post, I will link this solution on the numerous other forums or websites I had visited were others were having this issue of unwanted mass amounts of purgeable space that high Sierra was giving no option to delete.
 

Honza1

macrumors 6502a
Nov 30, 2013
933
433
US
Well, if this works, it is great fine. It can get worse. In my case I have removed all local snapshots using tmutil and still, over 400Gb were lost somewhere. After digging around, I found out, that there was whole hidden folder with Time machine backup - not snapshots, but whole Backp.backupd directory, with full separate backup of my drive. Snapshots were listed separately, this was real Time machine backup folder (on APFS drive!).
I had to delete that folder manually as this was not even Purgeable space. And deleting Backup.backupd directory is NOT easy. You can delete most of the files, but some systems files are very persistent. Ended using admin superuser and single mode and... Ended up reinstalling High Sierra.
Anyway, I suspect this was somehow created when my wifi - Airport connected TM disk disconnected over night (probably wifi error) and what was suppose to end on wifi connected disk ended on local drive.
 

prisstratton

macrumors 6502a
Dec 20, 2011
542
126
Winnipeg, Manitoba, Canada
Just to expand on this topic a little, does anyone know how to remove the (/var/vm) sleepimage. I have tried all of the solutions that worked previously, but when I try now I get the following:

Screen Shot 2017-09-28 at 8.15.47 PM.png


Thank you.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,137
15,602
California
this is utterly stupid: with macOS High Sierra it’s no longer possible to suppress local Time Machine backups using “tmutil disablelocal”.
It does not appear so. Although with APFS now the snapshots should take a lot less space than they did under HFS.
 

graywolf323

macrumors member
Feb 1, 2011
99
88
Virginia
trying this now, I've got over 300GB in space being sucked by this which is downright ridiculous, never had any such problem with Sierra and the old file system

can't believe they release High Sierra and APFS with this disaster

edit: this thread is the best! worked great :D went all the way down to ~47GB used by system
 
Last edited:

scotttnz

macrumors 6502a
Dec 16, 2012
817
3,383
Auckland, New Zealand
Thank you!! I spent a long time with Apple support today trying to resolve this issue to no avail. I was resigned to reinstalling, but after running these commands my System space has gone from 305GB to 34GB. :)
 
  • Like
Reactions: graywolf323

AeroZ

macrumors 6502a
Aug 7, 2013
674
351
Estonia
I just tried....

sudo chown -v username sleepimage, the system returns "Operation not permitted".

I also tried to take ownership through Finder...Get info, system returns:

View attachment 722160

This thing looks like it is locked down, guess I have to live with it.

Thanks....

In order to remove the sleep file which is required for hibernation you have to disable SIP in recovery. If you’re sure you want to do this then after disabling SIP you can execute the following commands:

Code:
sudo pmset -a hibernatemode 0

Code:
sudo rm /Private/var/vm/sleepimage

Code:
sudo touch /Private/var/vm/sleepimage

Code:
sudo chflags uchg /Private/var/vm/sleepimage

After that you can re-enable SIP.
 
  • Like
Reactions: prisstratton

prisstratton

macrumors 6502a
Dec 20, 2011
542
126
Winnipeg, Manitoba, Canada
In order to remove the sleep file which is required for hibernation you have to disable SIP in recovery. If you’re sure you want to do this then after disabling SIP you can execute the following commands:

Code:
sudo pmset -a hibernatemode 0

Code:
sudo rm /Private/var/vm/sleepimage

Code:
sudo touch /Private/var/vm/sleepimage

Code:
sudo chflags uchg /Private/var/vm/sleepimage

After that you can re-enable SIP.

Thank you. I will give that a try later on and reply back to this thread.

Edit: I decided to keep things as they are for the time being as I am not pressed for space on my SSD. I appreciate your response.....Thank you.
 
Last edited:

gages

macrumors regular
Sep 25, 2016
121
34
Assuming a MacPro w/ an external time capsule and automatic backups disabled (using latest time machine editor). Any idea what causes a local snapshot to occur? I have a few, but can't seem to figure out what initiates a local snapshot.

As I understand you can boot from a recovery partition and restore from a local snapshot using the GUI.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,137
15,602
California
Assuming a MacPro w/ an external time capsule and automatic backups disabled (using latest time machine editor). Any idea what causes a local snapshot to occur? I have a few, but can't seem to figure out what initiates a local snapshot.

As I understand you can boot from a recovery partition and restore from a local snapshot using the GUI.
https://support.apple.com/en-us/HT204015

This article explains a little. But basically, if you have Time Machine enabled any time you delete or edit a file, the old version is saved as a snapshot.
 

gages

macrumors regular
Sep 25, 2016
121
34
https://support.apple.com/en-us/HT204015

This article explains a little. But basically, if you have Time Machine enabled any time you delete or edit a file, the old version is saved as a snapshot.

Does not appear this is the case. I have external time capsule set to backup once per day. Here are my local snapshots

tmutil listlocalsnapshots /
com.apple.TimeMachine.2017-10-09-024632
com.apple.TimeMachine.2017-10-09-041633

I deleted a file, no change.

Will see if it creates another one after tonights backup.
 

MBX

macrumors 68020
Sep 14, 2006
2,030
816
I did this and it didn't do anything.

But the only thing it did is remove the time stamps in TimeMachine when you enter it. The dates of backups are all gone. Which sucks now.
 

Brookzy

macrumors 601
May 30, 2010
4,976
5,573
UK
Thanks for the research and your post. After reading your comment, I dug around some more and read the man pages.

I found this post by @oatman13 with the command below to thin those local snapshots.

Code:
sudo tmutil thinLocalSnapshots / 10000000000 4

That 10000000000 there is how much you want to thin in bytes (so about 9GB). I tested the command and the
listlocalsnapshots as you suggested before and after and this completely removed all the snapshots from my MacBook. I suppose if you had more than ~9GB you could stick another zero on that command to make it ~90GB.

At any rate the thinLocalSnapshots command removes them all with one command.
Thank you for this. For some reason my iMac made 200GB of local snapshots in the last 24 hours. Or rather, my free space plunged in the last 24 hours and an hour of searching brought me here! :p Must be a bug!
 
  • Like
Reactions: Weaselboy

ashleykaryl

macrumors 6502
Jul 22, 2011
467
211
UK
This may not be useful for many here, but last night I installed the latest beta 5 of SuperDuper! and ran a backup as usual to an external drive. Very strangely, my available drive space increased after that and has remained consistent during the day, whereas previously it was going up and down for no obvious reason. I'm wondering if SuperDuper! has fixed the cleanup issue.
 

karuktah

macrumors newbie
Nov 19, 2017
1
0
After upgrading to High Sierra the "System" storage was 260GB (About This Mac -> Storage). I also used DaisyDisk to confirm that there were "200GB of hidden system files" that can't be shown or deleted.

Turned to our good friend Google and I found that Time Machine local backups were the reason and 'sudo tmutil disablelocal' command was supposed to help, if only "disablelocal" verb had not been removed from High Sierra. So back to square one.

Did some digging a.k.a. opened the manual for tmutil. I found that there were two useful verbs "listlocalsnapshots" and "deletelocalsnapshots". Used the first one to get the exact date stamps required for the second one and deleted all local snapshots manually.

Result: "System" went from 260GB to 60GB.

Step by step I went as following:
Code:
sudo tmutil listlocalsnapshots /
This resulted:
Code:
com.apple.TimeMachine.2017-09-27-005259
com.apple.TimeMachine.2017-09-27-104645
com.apple.TimeMachine.2017-09-27-114218
com.apple.TimeMachine.2017-09-27-124220
I took these four date stamps and followed the next command with each as following:
Code:
tmutil deletelocalsnapshots 2017-09-27-005259

So in the end if i double checked with
Code:
sudo tmutil listlocalsnapshots /
there were no snapshots and after checking "About This Mac -> Storage" I was happy :)

Hope this helps!

Finally a fix!! thank you so much. "system" went from 157Gb down to 50gb. awesome.
 

bopshwop

macrumors newbie
Apr 2, 2008
16
43
In order to remove the sleep file which is required for hibernation you have to disable SIP in recovery. If you’re sure you want to do this then after disabling SIP you can execute the following commands:

Code:
sudo pmset -a hibernatemode 0

Code:
sudo rm /Private/var/vm/sleepimage

Code:
sudo touch /Private/var/vm/sleepimage

Code:
sudo chflags uchg /Private/var/vm/sleepimage

After that you can re-enable SIP.

This doesn't work for me in Sierra. SIP is disabled. Hibernatemode is set to 0. Still impossible to delete (or change permissions or ownership of) the sleepimage file.

I'd like to free up this space, which is of no use to me. I wonder what the secret is...
 

Sajal

macrumors regular
Mar 27, 2014
226
87
Thanks for the research and your post. After reading your comment, I dug around some more and read the man pages.

I found this post by @oatman13 with the command below to thin those local snapshots.

Code:
sudo tmutil thinLocalSnapshots / 10000000000 4

That 10000000000 there is how much you want to thin in bytes (so about 9GB). I tested the command and the
listlocalsnapshots as you suggested before and after and this completely removed all the snapshots from my MacBook. I suppose if you had more than ~9GB you could stick another zero on that command to make it ~90GB.

At any rate the thinLocalSnapshots command removes them all with one command.
You helped another clueless Mac user who was lost in identifying why 130GB of precious SSD storage was lost.

I am happy that my TM backup is on an external disk and would rather have my local disk for other purposes.
 
  • Like
Reactions: Weaselboy

MacSince94

macrumors newbie
Dec 3, 2017
1
1
After upgrading to High Sierra the "System" storage was 260GB (About This Mac -> Storage). I also used DaisyDisk to confirm that there were "200GB of hidden system files" that can't be shown or deleted.

Turned to our good friend Google and I found that Time Machine local backups were the reason and 'sudo tmutil disablelocal' command was supposed to help, if only "disablelocal" verb had not been removed from High Sierra. So back to square one.

Did some digging a.k.a. opened the manual for tmutil. I found that there were two useful verbs "listlocalsnapshots" and "deletelocalsnapshots". Used the first one to get the exact date stamps required for the second one and deleted all local snapshots manually.

Result: "System" went from 260GB to 60GB.

Step by step I went as following:
Code:
sudo tmutil listlocalsnapshots /
This resulted:
Code:
com.apple.TimeMachine.2017-09-27-005259
com.apple.TimeMachine.2017-09-27-104645
com.apple.TimeMachine.2017-09-27-114218
com.apple.TimeMachine.2017-09-27-124220
I took these four date stamps and followed the next command with each as following:
Code:
tmutil deletelocalsnapshots 2017-09-27-005259

So in the end if i double checked with
Code:
sudo tmutil listlocalsnapshots /
there were no snapshots and after checking "About This Mac -> Storage" I was happy :)

Hope this helps!
I've been desperately trying to fix my bloated 70GB system on my Airbook 128GB for HOURS and you're the first person who actually solved the problem! THank you SO MUCH!!!!! Although Weaselboys line of code works more efficiently, you are on the right track. I hope Apple fixes this.
[doublepost=1512309528][/doublepost]
Thanks for the research and your post. After reading your comment, I dug around some more and read the man pages.

I found this post by @oatman13 with the command below to thin those local snapshots.

Code:
sudo tmutil thinLocalSnapshots / 10000000000 4

That 10000000000 there is how much you want to thin in bytes (so about 9GB). I tested the command and the
listlocalsnapshots as you suggested before and after and this completely removed all the snapshots from my MacBook. I suppose if you had more than ~9GB you could stick another zero on that command to make it ~90GB.

At any rate the thinLocalSnapshots command removes them all with one command.

I added a zero as suggested and this solution worked perfectly! Trimmed about 50GB off my system. Thanks!
 
  • Like
Reactions: Weaselboy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.