How to free space by cleaning up old systemd / journald logs
If you need more free hard drive space on your system, you can clear old logs
Important note: When you’ve deleted old logs, they are deleted and there is no way to view them any more! Ensure that you don’t need them any more
View size occupied by those logs:
sudo du -sh /var/log/journal/
Tell journald to always only keep the last 25 Megabytes of logs (plus the current, not-rotated-yet logs):
sudo journalctl --vacuum-size=25M
Move current logs to archive ("rotate") and only keep the last 25 Megabytes of logs:
sudo journalctl --flush --rotate
sudo journalctl --vacuum-size=25M
Alternatively you can tell it to keep only the last hour of logs (plus the current, not-rotated-yet logs):
sudo journalctl --vacuum-time=1h