numarketing

Member
Jan 9, 2014
9
0
1
cPanel Access Level
Root Administrator
hi
I am new to cpanel & whm
I have a VPS with tmp fiile, which was appx 450 MB and was getting full.
I increased the space to 1GB and after few days its full again.
My assumption was it will cron and should get empty itself. but it seems not doing??
is there any way i could have it to empty itself??
or
do i need to empty it myself?? if thats the case, is someone can tell me how to do it??
sanjay
 

cPanelPeter

Technical Analyst III
Staff member
Sep 23, 2013
575
21
143
cPanel Access Level
Root Administrator
Twitter
Hello,

What sort of files are contained in /tmp? If it's session files then they should clear automatically. You may also want to look into tmpwatch. If it's not installed it would need to be installed first (in most cases that's yum install tmpwatch)

Once installed, type: man tmpwatch

An example on how to use it might be something like this:

Code:
tmpwatch --mtime --all 336 /tmp
The above will remove all files/dirs from /tmp if they are not accessed in last 2 weeks (24 * 14 days = 336)