Stop journald from eating all your disk space
Logging & Journald
Stop journald from eating all your disk space
🧩 The Challenge
Dealing with a server that suddenly hits 100 percent disk usage is a nightmare, especially when you realize it is just gigabytes of old journal logs that you will never look at again. I have wasted hours cleaning up partitions because I forgot to put a cap on how much history systemd actually keeps.
💡 The Fix
You can tell journald to keep your disk usage strictly under control so you do not have to worry about the logs ballooning until the filesystem locks up. Just edit the configuration to set a hard limit on the total size.
sed -i 's/#SystemMaxUse=/SystemMaxUse=500M/' /etc/systemd/journald.conf && systemctl restart systemd-journald
⚙️ Why It Works
By modifying the SystemMaxUse parameter, you force the journal to rotate out old files once the total storage hits that specific threshold. It prevents those annoying midnight alerts about running out of room on your root partition.
🚀 Pro-Tip: Use VacuumSize=250M with journalctl –vacuum-size=250M if you want to wipe the excess right now without waiting for a service restart.
Linux Tips & Tricks | © ngelinux.com | 9/22/2026
