Stop losing your sanity to journald disk usage
Logging & Journald
Stop losing your sanity to journald disk usage
🧩 The Challenge
You finally get an alert that your production node is out of disk space, only to find that /var/log/journal is hogging thirty gigabytes of ancient logs you don’t need. It’s ridiculous how fast that directory grows if you don’t set a hard cap on it.
💡 The Fix
Edit the journald config file to force a reasonable size limit, then restart the service so it actually cleans up after itself. You’ll thank yourself when you stop getting those midnight low-disk alerts.
sed -i 's/#SystemMaxUse=/SystemMaxUse=500M/' /etc/systemd/journald.conf
systemctl restart systemd-journald
⚙️ Why It Works
Modifying the config file tells journald exactly how much disk space it’s allowed to consume before it starts rotating out the old entries. Otherwise, the thing just keeps growing until it eats every last byte of your storage partition.
🚀 Pro-Tip: Use VacuumSize=250M in the same config file to trigger an immediate cleanup of everything over that limit.
Linux Tips & Tricks | © ngelinux.com | 9/6/2026
