Affected versions: Ubuntu 24.04 LTS Ubuntu 24.04 Ubuntu 24.04.1

πŸ“– ~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

Services fail to write state, apt fails, and logs stop rotating when /var is full.

Environment & Reproduction

Frequently caused by log growth, package cache buildup, or crash dumps.

df -h /var
sudo du -xh /var | sort -h | tail

Root Cause Analysis

Unbounded data growth in /var consumes available blocks.

Quick Triage

Identify largest directories and stale package cache quickly.

sudo du -xh --max-depth=2 /var | sort -h | tail -n 20

Step-by-Step Diagnosis

Inspect logs, apt cache, and journal size contributors.

sudo journalctl --disk-usage
sudo du -sh /var/cache/apt /var/log /var/tmp
Illustrative mockup for ubuntu-24-04-lts β€” terminal_or_console
Diagnosis commands for post 170 β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Clean package cache and vacuum journal to recover space safely.

Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo apt-get clean
sudo journalctl --vacuum-size=300M
sudo rm -rf /var/tmp/*
Illustrative mockup for ubuntu-24-04-lts β€” log_or_dashboard
Fix validation evidence for post 170 β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Expand /var filesystem or move high-growth paths to dedicated storage.

lsblk -f

Verification & Acceptance Criteria

Sufficient free space returns and failed services recover.

df -h /var
sudo systemctl --failed

Rollback Plan

Restore archived logs if retention policy requires recovered files.

# restore from backup archive if needed

Prevention & Hardening

Implement quota/alerts and tune log retention.

sudo journalctl --vacuum-time=14d

Related to no space left on device and write failed 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 management and journald retention guidance.

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.