Is it safe to rm -rf /tmp/*

tmp

This is something I used to do a lot on Windows, but after my recent fiasco I want to make sure. Is it safe to do

sudo rm -rf /tmp/*

?

Best Answer

In general, no.

If it's filling up with junk, you may want to look at what software isn't cleaning up after itself.

You can also use find to identify files which haven't been modified or accessed in a long time that are probably safe to delete.

Related Question