Trying to clear up some storage

Discussion in 'OS X El Capitan (10.11)' started by ourcore, Mar 5, 2016.

  1. ourcore macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #1
    Hey, guys,

    My MBP runs on a 120 GB SSD, which only has 60 GB available, so I'm trying to clear up some storage, or at least determine what is taking up the rest.

    I've tried the usual, including clearing caches, iTunes backups, mail downloads, and trash, but there's not much else because all of my iTunes media and documents are stored on a separate HDD, while only apps and their data is on the SSD. I've even relocated my Photos library and Plex Media Server data, which collectively took up around 7 GB. How much is typically taken up by the OS?

    I've attached screenshots of the "About this Mac" breakdown and OmniDiskSweeper's too to see if anyone can help me diagnose the issue.

    [​IMG]
    [​IMG]

    Any help would be appreciated!
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    Run the command below in Terminal and give it a few minutes to complete, then post up the output so we can take a look. This will show all hidden and system files that are not shown by apps like ODS.

    Code:
    sudo du -d 1 -x -c -g /
     
  3. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #3
    Thanks. This is what I got: Screen Shot 2016-03-05 at 16.15.08.png
     
  4. zhenya macrumors 603

    zhenya

    Joined:
    Jan 6, 2005
    #4
    You might also try a program like Grand Perspective to visualize how your storage space is used in more detail.

    Are iTunes backups happening on that main disk? They used up a huge amount of space on mine, with many from devices long gone.
     
  5. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #5
    I'll look into GP, but I've already used Disk Map and it did a really poor job at displaying most directories. I found more myself digging around the ~/Library folders. I'm not running iTunes, or Time Machine, backups at all. I just deleted some old iPhone backups. I just rely on iCloud.
     
  6. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #6
    Your entire Users folder is only 8GB, so there is no real issue there.

    /Applications is at 12GB. Any apps in there you don't need any longer.

    Both /private and /System are at 15GB, which is a little high normally.

    Run this to drill down a little in those folders to see what is going on.

    Code:
    sudo du -d 1 -x -c -g /private
    Code:
    sudo du -d 1 -x -c -g /System
     
  7. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #7
    Yeah, I'm guessing the 8 GB is app data and I'm fine with the 12 GB of Apps after reviewing what I have installed.

    Here is the output: Screen Shot 2016-03-05 at 16.47.44.png Screen Shot 2016-03-05 at 16.52.41.png Screen Shot 2016-03-05 at 16.52.46.png
    I navigated into /System/Library/Caches in Finder, but the largest file in there was 20 MB, even after enabling hidden files.
     
  8. DeltaMac macrumors 604

    DeltaMac

    Joined:
    Jul 30, 2003
    Location:
    Delaware
    #8
    You can trash that Caches folder from your System/Library folder. Just drag it to the trash. System will ask you to provide your admin password to do that.

    I bet you have 16GB of RAM, and the bulk of the 10GB in your /var/vm/ folder will be the "sleepimage" file.
    I create a folder with that name on the desktop. Lock it in Get Info for that folder - then drag it to that /var/vm/ folder. It will again ask to authenticate. When that folder is moved there, it replaces the sleepimage file, and you get all that space back on your drive.
    Restart after doing both of those items. That will at least get back near 20GB of space. The Caches folder in your System folder will be recreated on restart. The locked sleepimage folder can stay there. It will be returned to the normal file if you reinstall OS X. Otherwise, you would not likely notice that it does not have a usable sleepimage, which would only be problem if your battery goes completely flat while sleeping.
     
  9. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #9
    Please do not touch the caches, especially not the system caches, or anything in /System or /var. This data is there for performance and other reasons and deleting it will slow down your system for a while until everything is rebuilt (and this won't always take just a few hours). It may even cause unpredictable problems in system processes. The system will produce an abundance of caches and swapfiles or sleep images to keep your Mac speedy, so it is unavoidable. Saving space should not be the sole reason for cleaning it up. If you have specific issues with the cache, you should do a safe boot to let the system clear these files for you. A regular reboot may also clear some things up.
     
  10. DeltaMac macrumors 604

    DeltaMac

    Joined:
    Jul 30, 2003
    Location:
    Delaware
    #10
    I agree with what you say, and not messing with the System folder is good as a general rule - however, it appears that the OP may have a caches folder that has somehow grown too large, perhaps a file in that folder is corrupted somehow, IDK.

    For example, my ElCap /System/Library/Caches folder is only about 21MB. Why would THAT folder, for the OP, hold 10GB?

    Removing the Caches folder is not a bad thing to do, particularly if there is unexplained space used there.
    You DO need to stop where you are, and do that caches operation, and immediately restart.
    The Caches folder is rebuilt then, and should show a more "normal" size.
     
  11. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #11
    The problem is that the system does not restore all the caches on its own. For instance, the XPC cache is not automatically recreated, but only upon system installs and updates or when invoked manually with a system CLI program. Without understanding what exactly is the problem, it is rarely a good idea to empty the whole system caches folder manually. Safe boot and system reinstalls (without data wipe) are the better methods to do this, but they will come at a performance penalty also. In this instance, we also do not know what the OP has installed on their system. Dysfunctional third-party kexts can wreak havoc too, so it is not even self-evident that the system cache will stay that small.

    Regarding the sleep image and swap files, this is something that will be recreated as needed and deleting it won't solve the problem for long. The /private/var/vm folder can easily reach between 5-15 GB or more. This is also by design.
     
  12. DeltaMac macrumors 604

    DeltaMac

    Joined:
    Jul 30, 2003
    Location:
    Delaware
    #12
    Ga-a-a-ah! I bow to your experience...:oops:
    I used to delete Caches folders (all 3 of those) as part of a system tune-up. Not often, just every month or two.
    I just tried that on my main El Cap system, and you were right (and I was absolutely wrong). The system Caches folder did not rebuild, even over several restarts. I just finished up reinstalling El Cap - so I go on with my fun again.
    Regarding sleepimage - at the moment, I have no laptops (other than older ones that don't see much use) and 4 different desktops, all running El Cap. I always replace the sleepimage file with a locked empty folder with the same name.
    That only gets replaced with a "real" sleepimage file if I do a full reinstall, and it simply sits there as an empty folder (and takes up little space)

    @KALLT - if you are still reading - try out this question:
    I have two identical 2012 minis, both with current El Cap beta, and both with the same 10GB RAM installed.
    The only difference is an SSD in one, and spinning hard drive in the other.
    The HDD mini creates a 5.5GB sleepimage file, and the SSD mini creates a 2.15GB sleepimage file.
    Do you have any idea why the sleepimage file would be significantly different on two almost identical Macs (except for the storage drive.)
     
  13. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #13
    Thanks, @KALLT. I guess I should play it safe and leave those folders as they are. I can't really imagine much possibility of corrupt files since I really take care of my system and avoid piling too much on. My current setup was updated from a clean Yosemite installation in late 2014. No third-party kexts installed. I only use the boot drive to run apps.

    Other than the System Caches and vm files, is there anything else I could check out?
     
  14. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #14
    That /System/Library/Caches does seem large and one boot to safe mode will clear it out. Just reboot once while holding down the shift key and it will clear it out. Then reboot normally afterward. The cache files will get replaced as needed and that might slow the system a tiny amount as that happens, but on an SSD like you have it will not be noticeable.

    Otherwise, I don't see anything else that looks out of place.
     
  15. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #15
    Thanks. A normal reboot got me back 2 GB and a safe boot restored another 1 GB, but the Caches folder remains the same. What's odd is that Terminal shows it's 10 GB, but if I browse into it through Finder, the largest file in the folder is only 20 MB.
     
  16. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #16
    Finder does not show everything. You can check with this:
    Code:
    sudo du -h /System/Library/Caches
     
  17. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #17
    Looks like the 9.4 GB culprit is /System/Library/Caches/com.apple.coresymbolicationd. Googling around, it seems relatively safe to delete and let the system rebuild it.
     
  18. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #18
    Yeah... you can delete it and reboot.
     
  19. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #19
    I had a quick look as well and I suspect that the coresymbolication daemon is related to XPC (see here). This will not be properly rebuilt on its own until you update your system. If you have not done so yet, it would be better to perform a reinstall via Recovery (this will not delete your files). Alternatively, or if you have already deleted it, the following command may help you out (but I have never used it myself):
    Code:
    sudo /usr/libexec/xpchelper --rebuild-cache

    A large XPC cache may be the result of debugging code. You don't happen to have Xcode installed?
     
  20. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #20
    No, I haven't deleted it yet 'cause I wanted to be 100% sure, but I'd also prefer to avoid a reinstall. I just find that something usually messes up. I don't have Xcode installed at the moment, but I think I may have during this install. Not sure.
     
  21. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #21
    There is no problem deleting that file. It seems to get huge when run away errors are being reported. I have seen it both with Xcode installed and on systems without Xcode installed.

    All that will happen by the XPC cache being deleted is the console log will throw some XPC errors until the next point update comes out (like 10.11.4), but it won't hurt anything. Running that command KALLT gave you will rebuild the XPC cache if that concerns you.
     
  22. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #22
    Hmm I'll give it a go. Thanks. I get beta releases of OS X, so it shouldn't be too long before the next update.
     
  23. iLG macrumors member

    Joined:
    Sep 30, 2011
    #23
    I see you have 62GB free. Why do you need more free space?
    You did a good job already
     
  24. ourcore thread starter macrumors regular

    ourcore

    Joined:
    Aug 4, 2012
    #24
    Yes, it's a lot better now, but the available storage is still considerably lower than what's accounted for. When I had Outlook installed, I got down to <100 MB 'cause it decided to locally download my entire inbox, so I also want to be covered for issues like that.
     
  25. iLG macrumors member

    Joined:
    Sep 30, 2011
    #25
    Sorry I couldn't add anything more but I'd like Thank you for providing me with some extra tools for my own use. Cheers Ourcore
     

Share This Page