Keeping journald, logrotate, and tmpfs Lean on 20 GB Disks
On 20 GB KVM root disks, disk exhaustion almost always comes from one of three quiet culprits: unbounded systemd journal logs, accumulated old kernel packages in /boot, or verbose reverse-proxy access logs.
1. Audit Disk Usage by Top-Level Consumers
A two-line check tells you immediately where storage goes:
df -h -x tmpfs -x devtmpfs
journalctl --disk-usage && du -sh /var/log /var/cache/apt /boot 2>/dev/null
2. Keep Logs Focused on Signals
- Set
access_log off;on high-churn static and internal reverse-proxy vhosts while retainingerror_log ... warn;. - Enable
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";andRemove-Unused-Dependencies "true";so old Linux headers do not pile up after monthly security upgrades. - Verify
fstrim.timeris active so unused blocks are periodically reclaimed by the hypervisor.
With those defaults in place, a typical Ubuntu 24.04 server hosting Nginx, certbot, and lightweight Go daemons sits comfortably around 4–5 GB used year-round.