Solution: Reclaim storage back from "System"

Discussion in 'macOS High Sierra (10.13)' started by lainvoo, Sep 27, 2017.

  1. lainvoo macrumors newbie

    Joined:
    Sep 27, 2017
    #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!
     
  2. Weaselboy, Sep 28, 2017
    Last edited: Feb 21, 2018

    Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    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
     
  3. cabrown macrumors regular

    cabrown

    Joined:
    Sep 2, 2008
    #3
    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.
     
  4. Fishrrman macrumors P6

    Fishrrman

    Joined:
    Feb 20, 2009
    #4
    One more reason why I don't use TM and will never use it.
    I prefer CarbonCopyCloner -- a real backup program that doesn't muck and create invisible files on your main drive...
     
  5. Honza1 macrumors 6502

    Joined:
    Nov 30, 2013
    Location:
    US
    #5
    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.
     
  6. prisstratton macrumors 6502a

    prisstratton

    Joined:
    Dec 20, 2011
    Location:
    Winnipeg, Manitoba, Canada
    #6
    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.
     
  7. mikeboss macrumors 65816

    mikeboss

    Joined:
    Aug 13, 2009
    Location:
    switzerland
    #8
    this is utterly stupid: with macOS High Sierra it’s no longer possible to suppress local Time Machine backups using “tmutil disablelocal”.
     
  8. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #9
    It does not appear so. Although with APFS now the snapshots should take a lot less space than they did under HFS.
     
  9. JamBeats macrumors newbie

    JamBeats

    Joined:
    Sep 28, 2017
    Location:
    Florida
    #10
    It works! I have searched for so long and finally a solution! Thank you!
     
  10. prisstratton macrumors 6502a

    prisstratton

    Joined:
    Dec 20, 2011
    Location:
    Winnipeg, Manitoba, Canada
    #11
    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:

    Screen Shot 2017-09-29 at 12.06.26 PM.png

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

    Thanks....
     
  11. graywolf323, Oct 2, 2017
    Last edited: Oct 2, 2017

    graywolf323 macrumors member

    graywolf323

    Joined:
    Feb 1, 2011
    Location:
    Virginia
    #12
    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
     
  12. scotttnz macrumors 6502a

    Joined:
    Dec 16, 2012
    Location:
    Auckland, New Zealand
    #13
    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. :)
     
  13. AeroZ macrumors 6502

    AeroZ

    Joined:
    Aug 7, 2013
    Location:
    Estonia
    #14
    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.
     
  14. prisstratton, Oct 3, 2017
    Last edited: Oct 3, 2017

    prisstratton macrumors 6502a

    prisstratton

    Joined:
    Dec 20, 2011
    Location:
    Winnipeg, Manitoba, Canada
    #15
    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.
     
  15. gages macrumors member

    Joined:
    Sep 25, 2016
    #16
    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.
     
  16. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #17
    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.
     
  17. gages macrumors member

    Joined:
    Sep 25, 2016
    #18
    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.
     
  18. MBX macrumors 68000

    Joined:
    Sep 14, 2006
    #19
    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.
     
  19. Brookzy macrumors 601

    Brookzy

    Joined:
    May 30, 2010
    Location:
    UK
    #20
    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!
     
  20. ashleykaryl macrumors regular

    ashleykaryl

    Joined:
    Jul 22, 2011
    Location:
    UK
    #21
    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.
     
  21. karuktah macrumors newbie

    karuktah

    Joined:
    Nov 19, 2017
    #22
    Finally a fix!! thank you so much. "system" went from 157Gb down to 50gb. awesome.
     
  22. bopshwop macrumors newbie

    Joined:
    Apr 2, 2008
    #23
    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...
     
  23. Sajal macrumors regular

    Joined:
    Mar 27, 2014
    #24
    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.
     
  24. MacSince94 macrumors newbie

    Joined:
    Dec 3, 2017
    #25
    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.
    --- Post Merged, Dec 3, 2017 ---
    I added a zero as suggested and this solution worked perfectly! Trimmed about 50GB off my system. Thanks!
     

Share This Page

104 September 27, 2017