When l look into Ubuntu's System Log Viewer (I think that's the name in English) the messages categories are blown up with 70000 lines and almost 12MB in size. It mixes up messages from May this year and recent messages from the last few days.
How can I remove the old messages from May?
The packages
logrotate
andrsyslog
together will set up your system for automatic archiving and aging the syslog files.There are plenty of options to the logrotate(8) command that will help you truncate the current mess and then the rest should happen automatically.
There are two ways. If it was up to me, I'd determine the importance of the
sudo vi /var/log/messages
, and remove the lines from May. Then start up syslog/rsyslog again.@fmowrg :
It sounds like you added some duplicate lines to your logrotate configuration.
The file /var/log/messages (and most files under /var/log) should be rotated by
/etc/logrotate.d/syslog
(Or a similar file under /etc/logrotate.d/. Do agrep /var/log/messages /etc/logrotate.d/*
to be sure).There should be no need to add /var/log/messages to the file at /etc/logrotate.conf .