You may find your
/var/log/journal directory taking up a lot of disk-space.
How do you go about removing, or deleting all these files without the system complaining and falling over?
How to tell how much space is being taken?
You can ask the
journalctl command directly, using the
It will report something like this:
Journals take up 3.9G on disk.
Fix: Option 1 (not ideal):
Go and adjust it’s config under
/etc/systemd/journald.conf, making sure to pay attention to the
SystemMaxUse key; set this to something reasonable, like
At this point you can force a log rotation by issuing this command:
sudo systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service
Remember to restart the
systemctl process, like this:
sudo systemctl restart systemd-journald.service
Fix: Option 2 (not recommended):
You could always go and delete the offending
/var/log/journal/** directory contents, but this is not the recommended way, as the system journal could be writing here, which will probably cause you bigger problems!
Fix: Option 3 (RECOMMENDED!):
Simply run the following command to cleanup the
This will delete old log files until the directory reaches the threshold size stipulated, in our case, 500M.