Site icon New Generation Enterprise Linux

Stop journald from eating your entire disk for breakfast

Logging & Journald

Stop journald from eating your entire disk for breakfast

đź§© The Challenge

You finally get that alert about low disk space, and it turns out /var/log/journal has ballooned to 20 gigabytes because you forgot to put a cap on the logs. I’ve spent way too many Friday nights cleaning up these messes because the default config just assumes you have infinite storage.

đź’ˇ The Fix

You can clamp down on how much space the journals consume by tweaking the settings in your journald configuration file. It keeps your disk from filling up and saves you from a middle-of-the-night panic attack.

sudo mkdir -p /etc/systemd/journald.conf.d
echo -e "[Journal]\nSystemMaxUse=500M" | sudo tee /etc/systemd/journald.conf.d/limit.conf
sudo systemctl restart systemd-journald

⚙️ Why It Works

Setting SystemMaxUse tells the system to enforce a hard cap on the total size of the journal files, so it automatically rotates out the old ones once you hit that limit. Because you’re putting this in the drop-in directory, your changes won’t get wiped out when the package manager decides to update the main configuration file.

🚀 Pro-Tip: Run journalctl –disk-usage right now; if it says multiple gigabytes, stop reading and fix it before your partition goes read-only.

Linux Tips & Tricks | © ngelinux.com | 9/11/2026

0 0 votes
Article Rating
Exit mobile version