Linux journal consuming more disk space

Journal "/var/log/journal" contains logs of all systemd operations and it may lead to eating up the disk space.

We can check the disk usage of journal using the following command.

#journalctl --disk-usage

We can remove the contents of the folder "/var/log/journal" to free up the disk in emergency situations but do not delete the directory itself.

But this is not recommended and the proper way is to configure the maximum size of the folder in the configuration file itself.

Step1: Open the configuration file.

#vi /etc/systemd/journald.conf

Step2: Modify the following line.


Step3: Restart the service.

#systemctl restart systemd-journald

This will trigger the log rotation and that will free up the disk space.

That's all…