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.

Category
Troubleshooting · Servers & Linux
Time
15–30 min
Last reviewed
What you'll need
  • SSH or console access with sudo

Step-by-step diagnostic

Step 1 of 5
Show full guide

Steps

Goal: Confirm inode exhaustion, find directories with many files, and clean or archive.

  • Run df -i to 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 -i shows 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 -i shows 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.

  1. Confirm df -i Verify IUse% is 100%.
  2. Find many files find with wc -l to count files per dir.
  3. Delete or archive Remove old logs, cache, sessions; or tar and delete.
  4. 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.

Run `df -i`. IUse% 100%: find dirs with many files. Not 100%: the error may be disk space—run df -h.

You can change your answer later.

Check disk space

Run `df -h`. If Use% is 100%, see fix-linux-server-has-disk-full. If both df -h and df -i show space, check permissions.

Find directories with many files

Run find to count files per dir. Common: /var/spool, /var/log, /tmp, cache, session dirs. Delete or archive old files. df -i to confirm inodes freed.

You can change your answer later.

Done

Inodes freed. Set up logrotate or cron to prevent recurrence.

Archive or escalate

tar -cvf archive.tar /path; delete originals. Or move to another filesystem. If cannot delete safely, escalate with df -i and find output.

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.

Continue to