Cleaning /tmp

James Wilkinson fedora at aprilcottage.co.uk
Sat Mar 3 19:36:20 UTC 2012


Geoffrey Leach wrote:
> Fedora (not just 16) leaves junk in /tmp. It's also using some of that 
> junk, for example keyring-PRgjGV/.
> 
> So what's the best way to reduce the clutter? Is there a service?

One option is tmpfs. Put something like this in /etc/fstab:
none                    /tmp                    tmpfs   nodev,noexec 0 0
and everything in /tmp will be deleted whenever the system is rebooted
or powered down (unless you hibernate).

If you have plenty of memory, files in /tmp might never actually reach
disk, which can improve performance on some tasks. Otherwise, the system
will use the same algorithm as it uses for other files as to when to
reclaim the memory they use, at which point it will write them to swap.

Hope this helps,

James.

-- 
E-mail:     james@ | ... and watched Richard Stallman ask one of the waiting
aprilcottage.co.uk | staff whether the spring rolls did indeed spring and
                   | whether they would bounce.
                   |     -- Telsa Gwynne


More information about the users mailing list