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

System updates fail and services crash due to no free disk space.

Environment & Reproduction

Frequently caused by large logs, package cache, or container artifacts.

df -h
sudo apt update
systemctl --failed

Root Cause Analysis

Growth in /var/log, /var/cache/apt, or /var/lib/docker fills root partition.

Quick Triage

Find top disk consumers before deleting files.

sudo du -xhd1 /var | sort -h
sudo du -xhd1 / | sort -h
df -i

Step-by-Step Diagnosis

Pinpoint log, cache, and application directories with abnormal growth.

sudo du -xhd1 /var/log | sort -h
sudo journalctl --disk-usage
sudo du -xhd1 /var/lib | sort -h
Illustrative mockup for ubuntu-24-04-lts β€” terminal_or_shell
Disk usage analysis with df and du β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Clean apt cache, vacuum journals, and remove stale data safely.

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-time=14d
sudo rm -rf /var/tmp/*
df -h
Illustrative mockup for ubuntu-24-04-lts β€” logs_or_journal
Cleanup results after reclaiming space β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Expand LVM volume or move heavy data paths to separate disks.

sudo lvextend -L +20G /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

Verification & Acceptance Criteria

Free space returns above operational threshold and failed services recover.

df -h
systemctl --failed
sudo apt update

Rollback Plan

Restore removed app data from backup if accidental deletion occurred.

sudo rsync -a /backup/var/ /var/

Prevention & Hardening

Set log rotation and disk usage alerts.

sudo systemctl status logrotate
cat /etc/logrotate.conf

Often correlates with Docker image buildup and runaway journal logs.

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 cleanup best practices.

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.