systemctl journals filling up your disk

Quick one … your system probably uses logrotate to keep a fixed number of logs, and which stops your disk filling up. Trouble is, that systemctl doesn't write logs in the normal way so you can't rely on logrotate any more.

Check out your current systemctl log usage with

journalctl --disk-usage

Wait, whaaaat? Its using up 4Gb? By default journalctl will take up 15% of your disk, which seems a little greedy. You can immediately prune some of the logs with the following, which will limit to the size specified 200M, 1G, 500k etc.

journalctl --vacuum-size=500M

That buys you some space immediately on a system which is running out of room. If you want a longer term solution you can edit /etc/systemd/journald.conf and try setting eg.

SystemMaxUse=500M
SystemKeepFree=1G