There are instances when you are unable to connect to ssh due to disk space being full in tmp, reboot the server in cloud server manager and then try again.

Upon getting connected,run the following command:

yum install tmpwatch -y

Upon successfully installing tmpwatch, run the following command in order to delete all the old files over 12 hours old.

/usr/sbin/tmpwatch -am 12 /tmp

STEPS TO CONFIGURE YOUR SERVER TO REMOVE TMP FILES AUTOMATICALLY:

1] From SSH type

crontab -e

2] Paste at the very bottom

04***/usr/sbin/tmpwatch -am 12 /tmp

3] Press CTRL+X on PC and Command+X on MAC. Pop for confirmation will appear. Type   'Y' for Yes, and then press Enter.

Location for crontab for root is /var/spool/cron. So that you can add the line by using CSE.

Session file can be removed using the following command:

# cd /tmp
# rm -rf sess_*

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