← Knowledge Base
TroubleshootingReference note1 min read · updated 2026-11-27

Troubleshooting: "No space left on device"

Find out whether blocks or inodes are exhausted, what filled the disk and how to recover safely.

diskinodestroubleshooting
df -h            # blocks
df -i            # inodes: many tiny files can exhaust them even with free space
sudo du -xh --max-depth=1 / | sort -h | tail
sudo journalctl --vacuum-size=200M
sudo apt clean
docker system df
sudo lsof +L1    # deleted files still held open

Likely culprits: logs, the systemd journal, Docker images and build cache, old kernels, core dumps, /tmp, mail queues and backups kept on the same disk. A deleted file's space is only released once the process holding it restarts. Do not delete things in /var/lib/docker or database folders by hand; use the tools. Set up log rotation and an alert at 80% so it does not surprise you again.