Stop systemd from drowning in log files you never read
Logging & Journald
Stop systemd from drowning in log files you never read
🧩 The Challenge
Dealing with a server where journald has bloated to occupy half the disk is a nightmare I know too well. You go to check a quick error and find out your root partition is at 100 percent because some verbose process was running rampant.
💡 The Fix
You can clamp down on how much space the journals are allowed to hog by setting hard limits in the configuration. It keeps the logs useful without letting them turn your server into a brick.
journalctl --vacuum-size=500M
mkdir -p /etc/systemd/journald.conf.d/
echo -e "[Journal]\nSystemMaxUse=500M" > /etc/systemd/journald.conf.d/limits.conf
systemctl restart systemd-journald
⚙️ Why It Works
Setting the SystemMaxUse directive forces the daemon to prune old entries once the directory hits your specified ceiling. Running the vacuum command manually is the quickest way to reclaim that space immediately without waiting for a rotation.
🚀 Pro-Tip: Stick to a sensible limit like 500M or 1G unless you actually have a compliance team breathing down your neck for audit trails.
Linux Tips & Tricks | © ngelinux.com | 8/4/2026
