Stop journald from filling up your disk space until the OS panics

Logging & Journald

Stop journald from filling up your disk space until the OS panics

🧩 The Challenge

Dealing with a production server that suddenly hits 100% disk usage because journald decided it needed to save every single boot log since 2019 is a nightmare. I have spent way too many Friday nights cleaning up root partitions because nobody configured log retention limits.

💡 The Fix

You need to tell the journal to respect a maximum size or a specific time frame so it clears out the old junk automatically. It takes two seconds to set this up and saves you from a total system lockup.

echo "SystemMaxUse=500M" >> /etc/systemd/journald.conf && systemctl restart systemd-journald

⚙️ Why It Works

Setting the SystemMaxUse directive forces the daemon to prune the binary log files once they hit your defined threshold. It keeps the logs useful for troubleshooting without letting them run wild and consume your entire filesystem.

🚀 Pro-Tip: Use journalctl –disk-usage to see exactly how much space those logs are stealing right now.

Linux Tips & Tricks | © ngelinux.com | 8/8/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted