Linux No Space Left on Device
About Linux No Space Left on Device
Linux "No space left on device" means the filesystem is completely full and cannot accept any new data. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: errno 28 (ENOSPC) — filesystem full. Can also mean inode exhaustion (small files fill inodes). Services may crash when they cannot write logs. Database operations will fail on a full filesystem. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Log files consuming all available space. Large temporary files or downloads. Docker images/containers using disk space. Inode limit reached with millions of small files. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Check space: df -h and inodes: df -i. Find large files: find / -type f -size +100M. Clean logs: sudo journalctl --vacuum-size=500M. Clean Docker: docker system prune -a. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
How do I find what is using space?
Run: du -sh /* | sort -rh | head -20 to find largest directories.
Overview
Linux "No space left on device" means the filesystem is completely full and cannot accept any new data.
Key Details
- errno 28 (ENOSPC) — filesystem full
- Can also mean inode exhaustion (small files fill inodes)
- Services may crash when they cannot write logs
- Database operations will fail on a full filesystem
Common Causes
- Log files consuming all available space
- Large temporary files or downloads
- Docker images/containers using disk space
- Inode limit reached with millions of small files
Steps
- 1Check space: df -h and inodes: df -i
- 2Find large files: find / -type f -size +100M
- 3Clean logs: sudo journalctl --vacuum-size=500M
- 4Clean Docker: docker system prune -a