The /tmp folder, what can I delete?

jxmot

Member
Sep 24, 2014
22
1
53
cPanel Access Level
Website Owner
Hello,

I have really old cpanel account, it was created around 2002. It's been copied from one server to a new one several times. And I'm pretty sure there's stuff in there that is no longer needed.

I'd like to clean up the storage starting with the /tmp folder. My question is about what I can or should not delete in that folder. I'm pretty sure I can delete the old files from webalizer, awstats, etc. And there is probably a lot of other stuff I could delete. But I was wondering if there is anything in there that I should not delete. Or, is there a script I could run that would clean it up?


Any guidance is appreciated! Thanks!
jim
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,139
2,404
363
cPanel Access Level
Root Administrator
Hey there! Are we talking about /tmp on the root of the server or /home/username/tmp?

If /tmp, pretty much anything except the MySQL socket file can be removed as that is all temporary data on the system.

For /home/user/tmp, it's up to you. any sess_* files can be removed, but the other directories will be related to the stats and log processing. It's really up to you what you want to keep at the user level.
 

jxmot

Member
Sep 24, 2014
22
1
53
cPanel Access Level
Website Owner
Thanks for replying!

Yes, the /home/username/tmp folder is the one I was asking about. I'm in a "jailed" shell so no access to /tmp.

In regards to the stats & logs if I remove those folders will they be recreated by the respective applications?

Thanks again!