Can you safely purge old stats out of /tmp in Cpanel ?

DR4296

Member
Jul 17, 2002
6
0
151
So, I'm trying to conserve disk space on a particular account.

And there's 90 Megs of stats in /tmp, between folders for analog, awstats, and webalizer.
There are file dates in there from as far back as 2004. I thought maybe I'd only keep the last three years' worth of files, but I wasn't sure if me just zapping those old files would possibly "break" those stats programs when I go to view their stats?

My gut tells me I'm probably safe. But I Googled the topic, didn't find anything specifically about purging off old ones (found instead several threads on deleting EVERYTHING out of /tmp, which is not necessarily something I'd like to do), and thought I'd ask here.

Thanks!

-= Dave =-
 

kernow

Well-Known Member
Jul 23, 2004
1,031
62
178
cPanel Access Level
Root Administrator
cd to dir and use the find command to locate and delete files older than x days. Example:
Code:
find . * -type f -mtime +30 -exec rm {} \;
will delete files older than 30 days.
 

DR4296

Member
Jul 17, 2002
6
0
151
Well, I wasn't asking HOW to do it, I was asking if it would break anything.... other than the fact that when I'd use those stats utilities, I wouldn't be able to "see" that far back in time ??

I mean, I don't want to delete older files from those stats programs and suddenly find that those programs stop working. My gut tells me I'll probably be okay, but I thought I'd take the time to check before pulling the trigger.

-= Dave =-
 

quietFinn

Well-Known Member
Feb 4, 2006
1,894
463
438
Finland
cPanel Access Level
Root Administrator
I mean, I don't want to delete older files from those stats programs and suddenly find that those programs stop working. My gut tells me I'll probably be okay, but I thought I'd take the time to check before pulling the trigger.
I believe it's ok to delete the files, but you could 1st move the files to another directory, and if all is well after that you can delete the files.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Analog stats will be the one taking up most of the space, IMO. If you don't use it, disable it:
WHM » Server Configuration » Statistics Software Configuration

Some users might like to have Awstats going back to 2004 for statistical reasons of some sort. I'd start with analog first and see if thats enough free space for you to leave the rest.

Suggestions of course. YMMV. :)
 
Thread starter Similar threads Forum Replies Date
A Site Performance Analytics 5
W Site Performance Analytics 0