Oct 072020
 

The following tutorial Delete VPS Tmp Files WHM, shows you how to check the server status and delete files and folders in the /tmp directory.

Last Updated: December 13, 2020

Latest News: Updated the documentation.

It is important to monitor the server status regularly especially if you have many users hosted in your server. The are many jobs carried out in the backend in a server. These jobs tend to leave files and folders in the /tmp directory that are obsolete and occupy space. In time these files and folders can grow up to occupy the space in the /tmp directory. If you don’t delete these files, you will start experiencing lots of issues and crashes in your server and in websites hosted in your server.

In this tutorial you will learn how to check the status of your VPS and how to delete the files and folders in the /tmp directory. These steps are easy to follow for those who are comfortable working in a terminal environment and typing in commands.

Note: Make sure you never delete any .session files found in the /tmp directory and do not delete mysql.sock file if it exists.

Delete VPS Tmp Files WHM

Step 1 ) Log into WHM (Web Host Manager) as illustrated in the image below. Make sure you log in using https:// for security purposes.

update-php-version-vpn-server-log-into-whm

Step 2 ) Click on Server Status as illustrated in the image below.

delete-vps-tmp-files-server-status

Step 2-a ) Click on Service Status as illustrated in the image below.

delete-vps-tmp-files-service-status

Step 2-a ) Look for the Disk Information as illustrated in the image below. This area tells you how much disk space is used in your serer. In this example you can see that there is plenty of space left in the /tmp and /var/tmp folders. This is good news.

delete-vps-tmp-files-server-status-disk-info

Terminal

Note: If the status of your server shows the disk is getting full, then follow the steps below. They will help you delete any file or folder that is obsolete in the /tmp directory and no longer needed.

Step 3 ) Go to Home -> Server Configuration and click on Terminal as illustrated in the image below. The following is a list of commands that will help you search for and delete files and folders.

Terminal Commands

  • cd /tmp (To access tmp directory)
  • dir or ls to view what files and folders are in the /tmp directory.
  • Command to delete a folder with the name wordpress and all it’s content: rm -rf wordpress
  • Command to delete a file with the name new.tmp: rm -rf new.tmp

delete-vps-tmp-files-server-configuration-terminal

Step 3-a ) The following image shows you the cd /tmp command typed in the terminal. This command takes you to the /tmp directory. I find this to be a safe way of deleting anything inside the /tmp directory.

Step 3-a ) The following image shows you inside the /tmp directory. You can type dir or ls command to display what’s inside the /tmp directory.

delete-vps-tmp-files-server-terminal-cd-tmp-view

That is how simple it is to check your server status and delete unwanted files and folders from the /tmp directory in your VPS.

If you have any questions please let me know. I will be updating this tutorial from time to time. Come back to read the latest updates.

Enjoy.

I have been working in IT since 1999 and I enjoy the challenges it brings me. I love developing websites with WordPress. I spend a lot of time helping out in wordpress.org forums. I have been writing tutorials since 2011. Now I am learning how to manage my own VPS "Virtual Private Server.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

19 + three =