manually clearing my ubuntu-based linux tmp folder while booted from a linux live cd

Tekaholic asked:

If it is a temporary folder, then nothing should be required to remain there. Now I’m not looking to cause myself issues and I could just leave well enough alone but there are always folders and files in my /tmp folder. Even after reboot. And how do I know something isn’t executing from in there or should I care?

If I boot from a live cd and mount my installed hard drive and delete everything in that temporary folder, on reboot back to my normal system, I shouldn’t have any errors about missing this file or that program’s view returning to default or how many other things I didn’t think of that some other software is maintaining/using from the /tmp folder.

So my question is should I worry about this at all or can I continue with this procedure, confident no unwanted effects will arise?

Not that it should matter because I’m doing this while booted from a live cd but the normal installed operating system is Mint 13 with Mate.

My answer:


The contents of the /tmp directory cannot be presumed to survive a reboot. And on more modern systems than the one you’re using, the directory is in a tmpfs anyway, and thus its contents are always destroyed at shutdown. So, yes, it’s safe to do what you’re doing.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.