Affected versions: Ubuntu 24.04 LTS

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

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
Illustrative mockup for ubuntu-24-04-lts — var_full_df
Disk usage shows /var at 100% — Illustrative mockup — Progressive Robot

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
Illustrative mockup for ubuntu-24-04-lts — var_cleanup_fix
Cleaning apt cache and logs — Illustrative mockup — Progressive Robot

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 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.