Home > /tmp or /var/tmp & /usr/tmpDSK 100% full-How to empty tmp folder in cPanel

/tmp or /var/tmp & /usr/tmpDSK 100% full-How to empty tmp folder in cPanel

/tmp or /var/tmp & /usr/tmpDSK 100% full-How to empty tmp folder in cPanel

How to empty tmp folder in cPanel

tmp folder is used to dump temporary files. It is one of the most important folder of your linux server. That stores temporary session files. Learn how can you delete all files inside tmp folder or how can you flush tmp folder.

Solutions-How to empty tmp folder

Solution 1 (Quickest)- The first solutions says, delete all the session files from tmp folder by using the following command.

rm -rf /tmp/*

It will delete all the folders and files insider the /tmp folder. Once again your tmp folder will be empty.

Caution- Don’t delete /tmp folder orelse you’ll be facing some big troubles.

  • Solution 2-The second solution says, increase the size of tmp folder. (you can ready the tutorial in my upcoming posts) – How to increase the partition size of tmp folder
  • Solution 3-There is another solution of setting up a corn job that cleans the tmp folder on a regular interval. But that is not recommended for a server with high traffic.

Importance of /tmp folder-Why can’t we delete it?

The important of /tmp folder is because of the following reasons

  • It keeps temporary php session files
  • It keeps php and mysql file uploads
  • Cache files of certain apache uploads

For a WordPress website, 100% full tmp can cause many troubles include problem in file uploads, image http errors. Hence it is mandatory to allocate some free space to tmp folder.

Additional Tip-If you think it is getting full quickly then you should disable eaccelerator module from apache (using easyapache) or increase the size of tmp folder.

Let me know if the tutorial was helpful for you.

About Amin Khan

Amin Khan is a web developer, SEO expert, Online Mentor & marketer working from last 4 years on the internet and managing several successful websites.

Leave a Reply

Your email address will not be published. Required fields are marked *