Fix a Linux server that has full inode
We'll confirm with df -i, find directories with many small files, and clean or archive them—or tell you when to escalate.
What you'll need
- SSH or console access with sudo
Step-by-step diagnostic
Quick triage — pick your path
Get started
Choose the option that matches what you see. You can jump straight to that section.
Show full guide
Steps
Goal: Confirm inode exhaustion, find directories with many files, and clean or archive.
- Run
df -ito confirm IUse% is 100%. - Good: Inodes are full. Proceed to Find many files.
- Bad: If df -h shows full, see fix-linux-server-has-disk-full.
Confirm inodes
Goal: Verify inode exhaustion.
df -ishows IUse% at 100% for the affected mount.- Good: Proceed to Find many files.
- Bad: Check disk space with df -h.
Find many files
Goal: Identify directories with the most files.
- Run the find command to count files per directory. Check /var/spool, /var/log, /tmp, cache dirs.
- Good: You know which dirs to clean. Proceed to delete or archive.
- Bad: Run find on the full mount.
When to escalate
Escalate if:
- You cannot safely delete files.
- The directory is critical application data.
- You need a new filesystem with more inodes.
Provide df -i and find output.
Verification
df -ishows IUse% below 100%.- Writes succeed on the filesystem.
- Logrotate or cron prevents recurrence.
Escalation ladder
Work from the device outward. Stop when the problem is fixed.
- Confirm df -i Verify IUse% is 100%.
- Find many files find with wc -l to count files per dir.
- Delete or archive Remove old logs, cache, sessions; or tar and delete.
- Escalate Provide df -i, find output; consider new filesystem.
What to capture if you need help
Before calling support or posting for help, have these ready. It speeds everything up.
- df -i output
- find output for top dirs
- Steps already tried
Does df -i show IUse% at 100% for a mount?
Inode exhaustion causes "No space left" despite free space.
You can change your answer later.
Check disk space
Find directories with many files
You can change your answer later.
Done
Archive or escalate
Reviewed by Blackbox Atlas
Frequently asked questions
- Why would inodes be full when disk has space?
- Each file uses one inode. Many small files exhaust inodes before space. Logs, cache, mail spool, and temp dirs often have millions of small files.
- Can I fix full inodes myself?
- Yes. Find dirs with many files using find, delete or archive old files. You cannot add inodes to an existing filesystem without reformatting.
- When should I escalate inode issues?
- If you cannot safely delete files, the directory is critical application data, or you need to add a new filesystem with more inodes.
Rate this guide
Was this helpful?
Thanks for your feedback.