Logging & Journald
Reclaiming Disk Space from Journald Bloat
🧩 The Challenge
Systemd journal files can grow indefinitely, consuming gigabytes of disk space and slowing down log rotation. You need to enforce a stricter retention policy without manually deleting individual files.
💡 The Fix
Modify the global configuration to cap the maximum size of the journal and limit the duration of retained logs.
sed -i 's/#SystemMaxUse=/SystemMaxUse=500M/' /etc/systemd/journald.conf && systemctl restart systemd-journald
⚙️ Why It Works
This explicitly sets an upper bound on disk utilization, forcing the journal daemon to prune the oldest entries once the threshold is crossed to maintain system health.
🚀 Pro-Tip: Use journalctl –vacuum-time=7d to instantly purge all logs older than one week.
Linux Tips & Tricks | © ngelinux.com | 7/8/2026
