How do I stop /var/log/kern.log.1 from consuming all my disk space?

Solution 1:

You should be fine removing that file, cause it's an already rotated log. As you need root permissions to do that, you won't have an option in the GUI to delete that file.

You can do it from the command line:

sudo rm /var/log/kern.log.1

Each time you boot, log files will be created and rotated again, so you should probably watch for the next kern.log.* file sizes. Related bug report on Launchpad: https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/115774

Solution 2:

syslog

  • To prevent excessively large log files in the future, edit /etc/logrotate.conf to limit the number and size of log files. See man logrotate for more info.

systemd

  • To configure the Systemd journal, edit /etc/systemd/journald.conf. See man journald.conf for more info.

  • For info about basic journalctl usage, see systemd: Using the journal.

  • For info about how to reduce the size of the Systemd journal, see Systemd logs (journalctl) are too large and slow.