clearing out /tmp safely

Jeff Vian jvian10 at
Fri Mar 26 22:45:03 UTC 2004

Robert wrote:

> <snipped>

> [root at mavis root]# /usr/sbin/tmpwatch 240 /tmp
> and I *still* have a bunch of old files in /tmp
> [root at mavis root]# find /tmp -ctime +10 | wc -l
>     613
> [root at mavis root]#
> [root at mavis root]# find /tmp -ctime +30 | wc -l
>     461
> [root at mavis root]#
> [root at mavis root]# find /tmp -ctime +100 | wc -l
>     300
> [root at mavis root]#
> But since I installed FC1 on Nov 7, one would expect that there would 
> be   no files over 141 days old in the /tmp directory. And one would 
> be RIGHT!
> [root at mavis root]# find /tmp -ctime +141 | wc -l
>       0
> [root at mavis root]#
> So, the question is, what has happened to tmpwatch?  It worked fine in 
> RH6.0, RH7.2 and RH7.3 but it sure ain't working in my copy of FC1 and 
> I'll be double-damned if I can see what's wrong! Has anyone else been 
> here before me?  BTW, this was a clean install of FC1 on a new hard 
> drive rather than an upgrade.
> Any hints, tips, suggestions or at this point outright giveaways would 
> be most welcome.
> Thanks,
> Robert

What is your uptime?  

The system opens some things when it boots that remain until it gets 
rebooted, and these may be part of what you are seeing.  Tmpwatch is not 
supposed to remove stuff that is in use.

On mine I found over 2000 entries in /tmp/orbit-<user> directory.   
These are all socket entries and not actual files so they use no actual 
space, but they do consume inodes. The sockets are identified by the pid 
using them, and are created everytime you boot, so if you boot regularly 
then a lot will get created.

It seems that tmpwatch is not clearing old unused sockets but actual 
files are being kept cleared. (at least for me).

More information about the users mailing list