Is it safe to clear /var/log/messages?

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Hi,
The messages file in /var/log/messages is regularly well over 1gb and I need ot keep this smaller. because I am running out of space in /var.

Is it safe to just go like so?

> /var/log/messages

To empty that one down now and then?

Thanks much.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

The data in /var/log/messages is not required unless you need to troubleshoot an issue with general system activity. You can empty it, or add a custom LogRotate entry for it so it's rotated on a regular basis.

Thank you.