How to clear Logs file on cpanel -- home/user/logs

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello,

Do you mean the access-logs symlink at /home/user location or an actual folder called logs in /home/user?

I don't see any folder by that name on my machine and it isn't a typical folder we create.

As for the access-logs symlink, that would not be advised to remove.

Thanks!
 

Infopro

Well-Known Member
May 20, 2003
17,112
514
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Interesting. Do you have any cronjobs setup on that account? Have a look here for those:

cPanel > Advanced section > Cron Jobs

Do you have root access to this server or no? If yes, you might benefit from opening a ticket to cPanel Support. If no, you might ask your Hosting Provider to take a closer look at the logs to see whats generating these files.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
All right, I now know what is causing it as I don't normally check that option, but once the file's name was mentioned, it was clear these are the logs in cPanel > Raw Access Logs area. If you click:

Archive logs in your home directory at the end of each stats run[ [every 24 hour(s)~]]
Then this will save those folders for you on a monthly basis. If you don't click this:

Remove the previous month's archived logs from your home directory at the end of each month
Then they won't be removed. If you don't want to keep the raw access logs from Apache historically, then first go to cPanel > Raw Access Logs and check "Remove the previous month's archived logs from your home directory at the end of each month" so they are getting removed going forward.

If you want to remove the older access logs, you can remove them in that directory.