Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > HUGE temp files in /private/var/tmp - what are they?

HUGE temp files in /private/var/tmp - what are they?
Thread Tools
Dedicated MacNNer
Join Date: Nov 2002
Location: Chapel Hill, NC
Status: Offline
Reply With Quote
Apr 3, 2007, 01:16 AM
 
So I downloaded Disk Inventory X and looked at my mini's main volume, and I have two huge files sitting in /private/var/tmp - I thought this folder was supposed to get cleaned out as its a temp folder, but...

There are two files, one is 2.4GB, was created on 8/3/06 at 5:06 pm and last modified at 5:12 pm that day. The other is 1.9GB, was created on 8/4/06 at 1:54 pm and last modified at 1:58 pm.

So, I have two huge files in a tmp directory that haven't been modified in about 8 months....

What are they, and can I just delete them?

Uisce
     
Senior User
Join Date: Jul 2002
Location: Arizona Wasteland
Status: Offline
Reply With Quote
Apr 3, 2007, 01:25 AM
 
filename?
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Apr 3, 2007, 02:03 AM
 
Originally Posted by Uisce View Post
What are they, and can I just delete them?
Cache disk images maybe? Do you have Toast?

Since they haven't been modified in ages I'd delete them. If they would have been needed by some app, it wouldn't have left them in that directory.

Go Tar Heels!
     
Uisce  (op)
Dedicated MacNNer
Join Date: Nov 2002
Location: Chapel Hill, NC
Status: Offline
Reply With Quote
Apr 3, 2007, 08:25 AM
 
Filenmes a tmp.0.something - its just gibberish.


Well, I trashed them and restarted, boot up took longer than usual, but I ended up freeing up 7GB...
(Last edited by Uisce; Apr 3, 2007 at 08:37 AM. )

Uisce
     
Junior Member
Join Date: Dec 2005
Status: Offline
Reply With Quote
Apr 3, 2007, 08:58 AM
 
Hmm, I was told by a forumer at macrumors never to delete them, but I'm not sure what they are. He/she may have been wrong..
     
Mac Elite
Join Date: Jun 2006
Status: Offline
Reply With Quote
Apr 3, 2007, 10:06 AM
 
Don't touch anything in /var/vm.

the system uses those files either for swap files (which get deleted when you reboot) or putting the computer sleep mode. the laptops (I don't think the desktops need this) use an image file to save the state of the system before it goes into sleep mode.

Apple has hidden this folder (and others) for a reason, they don't want users going in there and playing with things.
Michael
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Apr 3, 2007, 10:12 AM
 
Actually, you can't delete the swap files. Well you can (it appears as if they have been deleted), but they're not really removed. Your Mac would crash pretty soon after if it were possible to actually remove them.

Note also that /var/tmp and /var/vm are completely different directories. One's the location for swap files ("virtual memory"), the other's a temporary scratch.

Anything a well behaved program relies on after a reboot should not be left in /var/tmp. If a file has been sitting there for months and you've rebooted several times since, you can delete it.
     
Uisce  (op)
Dedicated MacNNer
Join Date: Nov 2002
Location: Chapel Hill, NC
Status: Offline
Reply With Quote
Apr 3, 2007, 10:16 AM
 
Well, the files were huge, they're not there now, and nothing blew up...

Would something like an archive & install clean out the tmp folders?

Uisce
     
Uisce  (op)
Dedicated MacNNer
Join Date: Nov 2002
Location: Chapel Hill, NC
Status: Offline
Reply With Quote
Apr 3, 2007, 10:18 AM
 
Originally Posted by mac128k-1984 View Post
Don't touch anything in /var/vm.
Gotcha, but I was looking at the var/tmp - its my understanding that any tmp file in a tmp dir can be deleted without issue. Is this true?

Uisce
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Apr 3, 2007, 10:21 AM
 
Originally Posted by Uisce View Post
Gotcha, but I was looking at the var/tmp - its my understanding that any tmp file in a tmp dir can be deleted without issue. Is this true?
Across a reboot, yes. Obviously if the app that created it is still running it might try to read from or write to it. But after a reboot or after the app that used it has been closed, this shouldn't be a problem. Of course that's assuming the app is properly written and the developer sticks to the convention.
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Apr 3, 2007, 10:22 AM
 
Originally Posted by Uisce View Post
Would something like an archive & install clean out the tmp folders?
Yes. But I find A&I far too tedious and time consuming just to get rid of a simple tmp leftover that hasn't been touched in months.
     
Mac Elite
Join Date: Sep 2005
Location: Vancouver, BC
Status: Offline
Reply With Quote
Apr 3, 2007, 10:50 AM
 
On a UNIX system, opened files, when deleted, are not actually deleted. As long as there's a file handle attached to an inode, deleting that file doesn't remove the inode -- until the file handle is closed.

I regularly go in and delete crap in /var/tmp when I see that it's been there for a while. It's nothing to worry about.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:40 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2