Logging & Journald
Stop journald from eating all your disk space
đź§© The Challenge
You wake up to a call that a production box is read-only because journald decided to balloon to 50GB, effectively choking the root partition to death. I’ve wasted way too many Saturday mornings cleaning up after that default configuration.
đź’ˇ The Fix
Cap the logs at a sensible size so the daemon respects your actual disk limits. It’s the first thing I change on every new server build now.
sed -i 's/#SystemMaxUse=/SystemMaxUse=500M/' /etc/systemd/journald.conf && systemctl restart systemd-journald
⚙️ Why It Works
By editing the config file and bouncing the service, you force the daemon to prune older log entries once it hits your specified threshold. Most production services don’t need years of history taking up space.
🚀 Pro-Tip: Use journalctl –disk-usage to check how much space you’re actually burning right now.
Linux Tips & Tricks | © ngelinux.com | 8/2/2026
