Open SSH to your server, if SSH will not connect due to disk space full in tmp, reboot your server in cloud server manager then try again.

 

Once connected run the following command.

yum install tmpwatch -y

 

Once tmpwatch is installed run command.

/usr/sbin/tmpwatch -am 12 /tmp

 

This will delete all files over 12 hours old.  Next, we will configure your server to do this automatically.

from SSH type:  crontab -e

 

Go to the very bottom and paste.

0 4 * * * /usr/sbin/tmpwatch -am 12 /tmp

 

Then press Control+X (on PC) or Command+x (on Mac) you will get confirmation do you want to save. Type Y for yes, and press enter.

 

The Location for the crontab for root, /var/spool/cron so you can add the line by using CSE. You can remove the session file using the following command.

# cd /tmp
# rm -rf sess_*

 

The filesystem “/var/tmp” mounted at “/var/tmp” reached “warn” status because you currently use 84.29% of its available blocks.

 

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket