# /tmp is full :(



## trybeingarun (Feb 13, 2010)

Hi all,
My /tmp(3.5 GB) is full now. My questions are...

Is this an issue to be bothered about?
Is it okay if i delete everything inside /tmp (because it is temporary files)?
If this is an issue then what should I do to make sure it does not get full then next time?


----------



## fronclynne (Feb 13, 2010)

Well, subject to local interpretations (obviously), hier(7) says 
	
	



```
/tmp/      temporary files that are not guaranteed to persist across sys-
                tem reboots
```
But it's your machine.  Normally the *system* doesn't put anything into /tmp/ that it expects to find very much later, but there are poorly built apps and there are also different conventions: back in the dim & distant past people mounted backup volumes and such under /tmp/.

As far as local conventions go, on my old x40, I use an mfs /tmp/, so nothing ever persists across reboots.


----------



## fronclynne (Feb 13, 2010)

Also, if you want, you can set "clear_tmp_enable=YES" in /etc/rc.conf to take care of cleanups for you.  Beware that it has no idea what is important to you.


----------



## trybeingarun (Feb 13, 2010)

As a temporary solution I have created a tmp folder in my home directory and have created a sym link from tmp to that folder. I have also changed the access permissions.


----------



## mk (Feb 13, 2010)

what do you have actualy in /tmp ? is it important to you ? if it is copy it to some other place on your system and clear /tmp,if not and is junk, just rm FILE or put clear_tmp option in rc.conf


----------



## trybeingarun (Feb 13, 2010)

I have not put anything in there. I am just worried if i will have problems after deleting the contents of /tmp


----------



## Beastie (Feb 13, 2010)

Well, check the files stored there and remove those that are taking all the extra space and that *you* don't need. If programs need one file or another, they'll recreate them on their next run.
My /tmp partition is virtually empty, mostly contains a few sockets and is 256MB big.

What's the output of `% du -h /tmp`?


----------



## SirDice (Feb 15, 2010)

Just reboot. By default the system will clear /tmp and rebuild the directory structure needed for X11.


----------



## Beastie (Feb 15, 2010)

*clear_tmp_enable* is *disabled* by default.


----------



## SirDice (Feb 15, 2010)

Beastie said:
			
		

> *clear_tmp_enable* is *disabled* by default.



Yes, but clear_tmp_X is enabled by default.

From /etc/defaults/rc.conf:

```
clear_tmp_X="YES"       # Clear and recreate X11-related directories in /tmp
```


----------



## Beastie (Feb 15, 2010)

But I doubt the few X-related directories that usually only contain sockets and "lock" files could fill almost 3.5GB! There must be something else in there.


----------



## fronclynne (Feb 15, 2010)

I agree, unless /tmp/ is being purposefully used to store stuff, 3.5G is very high (like an order of magnitude higher than I've seen in ten years).  I have, in the dim & distant past, tossed a *.tar in there and forgotten to delete it, but that's not really the system's fault.


----------

