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.
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.
Step 2 ) Click on Server Status as illustrated in the image below.
Step 2-a ) Click on Service Status as illustrated in the image below.
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.
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.
- 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
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.
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.