Can I safely remove tmp files?

linux-penguinYou may find that your /tmp directory gets full sometimes. This article describes a process for managing this.

Open a Terminal

Start by accessing your web server via a terminal. Typically you'll use SSH for this.

You might like to start by checking the current size of your /tmp directory.

du /tmp


Now you can find all files that are more than 10 days old (there are 1440 minutes in a day).

find /tmp -mmin +14400


If you are happy to get rid of these files, you can run the following command.

find /tmp -mmin +14400 -delete


I've never had a problem with deleting tmp files that are more than 10 days old.


Thanks for visiting,