📖 ~1 min read
Table of contents
Symptom & Impact
Services and package operations fail with no space left on device errors.
Environment & Reproduction
Observed on long-lived systems with unchecked log and cache growth.
df -h
sudo apt update
journalctl -p err -n 30 --no-pager
Root Cause Analysis
Root filesystem reaches 100% usage due to logs, caches, containers, or old kernels.
Quick Triage
Find top consumers under root quickly.
sudo du -xhd1 / | sort -h
sudo du -xhd1 /var | sort -h
sudo journalctl --disk-usage
Step-by-Step Diagnosis
Check package cache, logs, and stale artifacts.
sudo du -sh /var/cache/apt/archives /var/log /var/lib/docker 2>/dev/null
ls /boot | grep -E 'vmlinuz|initrd'
sudo lsof +L1 | head

Solution – Primary Fix
Free space safely, then retry failed operations.
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=7d
sudo apt autoremove -y
sudo apt update

Solution – Alternative Approaches
Move high-growth data paths to secondary storage.
sudo systemctl stop docker || true
sudo rsync -aHAX /var/lib/docker/ /mnt/data/docker/
sudo mount --bind /mnt/data/docker /var/lib/docker
Verification & Acceptance Criteria
At least 15% free space remains and apt succeeds.
df -h /
sudo apt update
sudo apt-get check
Rollback Plan
Undo bind mounts and restore archived files if needed.
sudo umount /var/lib/docker 2>/dev/null || true
sudo systemctl restart systemd-journald
Prevention & Hardening
Set retention policies and alerts for disk thresholds.
sudoedit /etc/systemd/journald.conf
sudo systemctl restart systemd-journald
df -h
Related Errors & Cross-Refs
Often appears with inode exhaustion and /boot capacity issues.
Related tutorial: View the step-by-step tutorial for Debian 13.
View all Debian 13 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Debian storage cleanup and journald retention documentation.
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.