📖 ~1 min read
Table of contents
Symptom & Impact
Updates, logging, and services fail when `/var` reaches full capacity.
Environment & Reproduction
Frequent on hosts with high log growth and small root partitions.
df -h /var
Root Cause Analysis
Unbounded log growth, package cache accumulation, or runaway spool files consume space.
Quick Triage
Locate top directories consuming space.
sudo du -xh /var --max-depth=1 | sort -h
Step-by-Step Diagnosis
Identify large files and stale package cache contents.
sudo find /var -xdev -type f -size +200M -ls && sudo du -sh /var/cache/apt

Solution – Primary Fix
Clean apt cache, vacuum journals, and rotate logs.
Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo apt clean && sudo journalctl --vacuum-size=500M && sudo logrotate -f /etc/logrotate.conf

Solution – Alternative Approaches
Extend filesystem/LVM capacity or move heavy paths to dedicated mounts.
Verification & Acceptance Criteria
At least 15% free space on `/var` and package commands run successfully.
Rollback Plan
Restore archived logs if business retention obligations require rollback.
Prevention & Hardening
Set disk usage alerts and enforce log retention policies.
Related Errors & Cross-Refs
Related to `No space left on device`, failed journald writes, and apt cache errors.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu storage, journald, and logrotate management docs.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.