[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /tmp accidentally filled



Lisi Reisz un jour écrivit:
As I said, I have never had to do anything to tmp before. But it has not cleaned up at boot and the fact that it is 100% full is causing problems. This is a direct result of the mess I created when I messed up my backup. I have deleted the bulk of the stuff wrongly placed on my root partition - so most things are working fine again - and am left with this 100% filled tmp.

From what you say, I can safely delete the lot? After all, if it should have been cleaned up automatically, it can't hurt if I clean it up manually?


There is probably some exception, but in most cases you can safely delete everything in /tmp without any major problems. If the files where essentials, they would be put somewhere else than in the temporary folder, possibly in /var/tmp (those are not deleted automatically after a reboot).

In practice, you will probably not notice any difference, and can just restart the affected program if you do, which is seldom a problem for a desktop. I personnaly have no shame in deleting mostly anything there. In the worst case, you could just reboot and everything will be ok, since the files are just temporary files.

Notice that if the file is already opened and actively used by a program, it won't be removed from the hard drive until the application close the file. This avoid most problems related to deleting a used file, thanks to the Unix heritage. If you are curious, an easy trick to see those "deleted" but still open files is to run "sudo lsof /tmp".

I remember that an old versions of SuSE deleted automatically anything in /tmp that has not been accessed in the past 2 weeks. I don't rember if they still do, but that give you an hint that deleted files in /tmp is not particularly evil (unless you do so only to replace them by symlink to /etc/shadow ;o)

Simon Valiquette
http://gulus.USherbrooke.ca

The partition is now only ~20% full, so I have loads of space. But since at least these files shouldn't be in tmp, I would rather delete them than start messing around with the filing system.

Lisi





Reply to: