Stop journald from eating all your disk space

Logging & Journald

Stop journald from eating all your disk space

🧩 The Challenge

Dealing with a production server that suddenly went read-only because the journal log filled the entire root partition is a special kind of hell. I’ve wasted too many lunch hours hunting down these massive binary files.

💡 The Fix

You need to put a hard limit on how much disk space the journal is allowed to hog. It keeps your logs manageable and prevents the system from locking up during a crunch.

journalctl --vacuum-size=500M
sed -i 's/#SystemMaxUse=/SystemMaxUse=500M/' /etc/systemd/journald.conf
systemctl restart systemd-journald

⚙️ Why It Works

Setting a SystemMaxUse value in the config tells the daemon to rotate and delete old logs once they hit that threshold. It basically forces the system to stop hoarding data you’ll never actually read.

🚀 Pro-Tip: Use vacuum-time instead if you prefer keeping logs based on age rather than size.

Linux Tips & Tricks | © ngelinux.com | 7/29/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted