Affected versions: Debian 11

📖 ~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 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
Illustrative mockup for debian-11 — terminal_or_shell
Finding largest directories on root filesystem — Illustrative mockup — Progressive Robot

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
Illustrative mockup for debian-11 — log_or_config
Cleaning logs and package caches — Illustrative mockup — Progressive Robot

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

Often appears with inode exhaustion and /boot capacity issues.

Related tutorial: View the step-by-step tutorial for Debian 11.

View all Debian 11 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.