Hidden folders "private" and "usr" taking up a lot of space

Hello,


I have a 120GB mabook air running Snow Leopard and recently I've been getting a "Startup disc is full" warning. I cleared about 10 GB of data from the drive just a couple of days ago, and it is full again, even though I have not been downloading any large files.


So I started searching through the hidden files and folders to see if I could locate what has been occupying all of this space on my hard drive, and I have located a folder called "private" with subfolders etc, tftpboot, tmp and var containing almost 15GB of data, and another folder called "usr" containing 4.5GB of data. This is almost 20GB that I am hoping might be reclaimed on my meager hard drive.


Does anyone know what these folders are, and if their contents are all necessary? If so, any ideas as to where else to look for wasted hard drive space?


Thanks in advance for any advice or suggestions.

MacBook Air (13-inch Late 2010), Mac OS X (10.6.8)

Posted on Dec 18, 2013 4:36 PM

Reply
5 replies

Dec 18, 2013 5:28 PM in response to Niel

Thanks Neil. I looked in the private/var/vm subfolder and found that the files therin were taking up the most space (13GB). However, another thread on here suggests that deleting these "swapfiles" shouldn't be deleted either, and that instead one should simply try rebooting.


I guess this won't solve my problem of the startup disc continually filling up, but I will keep looking for a solution and respond here again if I find one.


Thanks again.

Dec 18, 2013 5:43 PM in response to sea-haze

My entire private and usr come to a total of ~2.5 GB. You probably have some runaway process or app that's logging thousands of message per second eating up your drive space.


Look through /var/log and open up Console in Utilities and look through the various logs for repeating messages.


See


http://pondini.org/OSX/DiskSpace.html


http://pondini.org/OSX/Logs.html


EDIT after seeing your last post. Be sure to see System Work Files at the first Pondini page I linked. A restart should trim a lot of that down, until it just fills up again. You're low on RAM.

Dec 19, 2013 8:51 PM in response to sea-haze

/private/var/vm are where Mac OS X writes data from apps you are running that cannot all fit into RAM. If you were to succeed in deleting them, you system would most likely crash. Or if you are lucky the operating system would have an open reference on the files, and they would remain as files you can no longer see, but the storage would still be used until the operating system rebooted.


The other file you may see in /private/var/vm is sleepimage, which will equal the size of the RAM in you Mac. Mac OS X writes a copy of the RAM to sleepimage when your Mac goes to sleep so that if it runs out of power, Mac OS X can continue your session from the sleepimage. Sleepimage is also used when the Mac goes into hibernate, which is more energy efficient than Sleep.


My /private/usr has about 1GB in it. And I know I have some extra stuff installed from XCode and from Open Source in /private/usr/local that accounts for about half of that. So a user that does not add XCode and their own Open Source compiled stuff should have something around 500MB more or less.


You might want to try using OmniDiskSweeper to see where your storage is. But just as you have done with /private/var and usr, ask before deleting anything that is not part of your home directory tree. That is to say, unless you know for a fact that you created that file and you know what is in it and that deleting it will not upset you, then you should Google the file and/or ask in these forms what it is and can it be safely deleted.

Dec 19, 2013 9:31 PM in response to BobHarris

Thank you, Bob Harris, for explaining all of this. I was not aware that computers would draw on permanent memory in order to supplement the RAM when the RAM was insufficient for running all applications, though the sleep memory files makes good sense to me, and I can see how supplementing insufficient RAM works on a similar principle. I am happy I did not delete any of these files without checking. I will try to find other ways to economize on space.


In the meantime, restarting my computer has helped, particularly since having shut down MS Word. After following the links provided by WZZZ, I used Console to check if there were any repeating error messages, and it turns out some MS Word operation was repeatedly failing and piling up error messages to some folder, which was using up space. (I found another thread on this apple support website suggesting that this was a bug in the Word software.)


Interestingly, my folder usr takes up far more space than my RAM (4.3 GB compared to just 2GB of RAM). Hopefully this is not highly unusual.


Thanks again.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Hidden folders "private" and "usr" taking up a lot of space

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.