Stop journald from filling up your disk when things go sideways

Logging & Journald

Stop journald from filling up your disk when things go sideways

🧩 The Challenge

Dealing with a production server that stopped responding because journald filled the entire root partition with logs is a rite of passage I never want to repeat. You see the disk at 100% and realize your diagnostic tools can’t even write temporary files to debug the issue.

💡 The Fix

Setting a strict storage limit in the configuration file stops the logs from being a runaway train. It forces the system to rotate and prune old entries before the OS hits a brick wall.

echo "SystemMaxUse=500M" | sudo tee -a /etc/systemd/journald.conf && sudo systemctl restart systemd-journald

⚙️ Why It Works

Setting this directive creates a hard ceiling on how much space the binary journal files can occupy on your disk. Once that threshold is crossed, journald automatically purges the oldest segments to stay within your limits.

🚀 Pro-Tip: Use journalctl –disk-usage to check your current log footprint before you decide on a sensible limit.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted