No space left on device
A full filesystem breaks writes, logs and installs. Check space and inodes with df, find the big directory with du, and trim the systemd journal.
What you see
No space left on devicewhen writing a file, installing a package or starting a service
What it means
A filesystem can run out of two things: space and inodes. Inodes are the records the filesystem keeps for each file. A disk full of millions of tiny files can be out of inodes while df -h still shows free space.
How to confirm the cause
- 1Check space per filesystem
df -h
Find the filesystem at or near 100% use.
- 2Check inodes per filesystem
df -i
-i(--inodes) lists inode information instead of block usage. High IUse% with free space means too many files. - 3Find the big directory, staying on one filesystem
du -xh --max-depth=1 /var
-xstays on one filesystem,-his human readable,--max-depth=1shows one level. Repeat on the largest directory to drill down. - 4See how much the systemd journal uses
journalctl --disk-usage
Shows the total disk use of archived and active journal files.
Causes and fixes
Logs or the journal grew
- HOW TO TELL
/var/logor the journal is the biggest directory.- FIX
- Shrink archived journal files to a size. This removes the oldest archived files and does not touch active ones.
sudo journalctl --vacuum-size=500M
Out of inodes
- HOW TO TELL
df -ishows IUse% at or near 100%.- FIX
- Find the directory with the most small files and remove what is safe to remove, such as old cache or session files. Freeing bytes does not help if the count of files stays the same.
Unused container data
- HOW TO TELL
- Docker is installed and
/var/lib/dockeris large. - FIX
- See the Docker disk space runbook for prune commands and what each one can delete.
How to stop it coming back
- Alert on disk space and on inode use, not only on space.
- Set a journal size limit and log rotation.
- Put data directories on their own filesystem so one full volume does not stop the OS.
Keep going
- Runbook: Docker is using too much disk space
- Runbook: A systemd service failed to start
- Cheat sheet: Linux
- Cheat sheet: journalctl
- Lesson: the linux topic in Learn
Sources
Linux man-pages (man7.org) and the systemd manual (freedesktop.org), read 18 Nov 2026. Command options were checked against those pages.