/private/var/tmp question

Posted:
in Genius Bar edited January 2014
I had my computer on and hadn't used it in a few days, then when i turned on the monitor to use it i had all these system messages saying i was out of disk space and i know for sure i had like 10 gigs free. i did get info for my main hard drive and it said zero bytes were free. so i restarted and then it said i had 66 mb free. so i used WhatSize to see where all my storage space went and everything looked normal and there was no reason why my 10 gigs would have disappeared. then i looked in the /private/var/tmp directory and WhatSize said it has like 40 gigs in it. now, i dunno if this contributed to my original problem of my 10 gigs being used up (because i never really looked in this directory because its hidden), but now im curious what this directory is and if i can delete its contents (to free up space)? any help/advice would be greatly appreciated. thanks in advance!



-Jordan

Comments

  • Reply 1 of 6
    MarvinMarvin Posts: 15,322moderator
    It's where applications put stuff temporarily, some programs for example cache data there. It might be best to leave the mds folder if it's in there as that's for Spotlight. The rest can probably go. What files are using 40GB space?
  • Reply 2 of 6
    first, thanks for your reply.



    there isn't really one file taking up the 40 gigs, its just a ton of small files, but there are a few larger ones... the largest being 28 MB. i also dont see a mds folder, is that a bad thing?



    also, shouldnt all this stuff be cleared automatically by the system at some point, maybe when the system is rebooted? 40 gigs of temp files is a bit ridiculous.



    thanks again for your help!



    -Jordan
  • Reply 3 of 6
    MarvinMarvin Posts: 15,322moderator
    Quote:
    Originally Posted by JordanEatWorld View Post


    first, thanks for your reply.



    there isn't really one file taking up the 40 gigs, its just a ton of small files, but there are a few larger ones... the largest being 28 MB. i also dont see a mds folder, is that a bad thing?



    also, shouldnt all this stuff be cleared automatically by the system at some point, maybe when the system is rebooted? 40 gigs of temp files is a bit ridiculous.



    thanks again for your help!



    -Jordan



    Spotlight will put an mds folder there probably as it's indexing - if it's not indexing, it won't need to put anything there. /private/var/tmp is a temp folder so things will go in and out all the time. If there was an mds folder, it would have been best not to delete that as it was probably being used by Spotlight at the time but usually stuff in there is just old data files.



    Do you have any indication about what application put the small files there - are they in a folder together? If you open one of the smaller ones (under 1MB preferably) in textedit, does it look like anything familiar?



    Some temp folders are cleared regularly - for example, the /tmp folder at the root directory is cleared every day if your machine is on overnight as it runs the cron daily script. The /private/var/tmp directory isn't. By default, Shake caches its data in there and it doesn't clear - I have to manually delete stuff quite regularly.
  • Reply 4 of 6
    kickahakickaha Posts: 8,760member
    /private/var/tmp (also accessible through /tmp) is flushed on reboot.



    Deleting files in there is fine... *AS LONG AS* the app that created them isn't still *using* them. Note also that not all apps that use /tmp have a GUI component, so rebooting is simply the safest and easiet way to go.



    Any idea what the files looked like, were named, etc, etc, etc? Might give you a clue as to what was going bonkers...
  • Reply 5 of 6
    it seems like the majority of the files are from norton anti-virus. ill delete everything.



    now, thats solved... any idea of where my 10 gigs went over a few days, when i didnt use it (at all) and i wasnt even downloading anything?



    thanks again for the help!



    -Jordan
  • Reply 6 of 6
    kickahakickaha Posts: 8,760member
    Quote:
    Originally Posted by JordanEatWorld View Post


    it seems like the majority of the files are from norton anti-virus. ill delete everything.



    now, thats solved... any idea of where my 10 gigs went over a few days, when i didnt use it (at all) and i wasnt even downloading anything?



    thanks again for the help!



    -Jordan



    Ewwwwwww.... Norton is a known trouble-maker on many levels.



    I had a 10.3 Server CUPS print server process go haywire on me once and fill the spool space with garbage, but that was a one-time bizarrity.



    Rebooting is simply the easiest to way for a number of processes to clear their spaces up. It could be virtual memory swapspace in /private/var/vm/, if you have a process/app with a bad memory leak. A reboot takes care of that too.



    If, after rebooting, you're still missing the space, try using WhatSize, OmniDiskSweeper or another sizer tool to find out what area is eating the space.
Sign In or Register to comment.