Check inode usage with df -i

Diagnose 'No space left on device' errors when gigabytes of free space remain.

Linuxstoragedisk-spaceDiagnosticsLow risk
Run df -i and look for a filesystem near 100% in IUse% — if so, the problem is inode exhaustion from millions of tiny files, not bytes.

01Command

Command
$ df -i

02What it does

Every file, symlink and directory consumes an inode, and each filesystem has a fixed inode table created at format time. When those run out, writes fail with 'No space left on device' even though df -h shows gigabytes free. df -i prints used/free inodes per mount, and the usual suspects are mail queues, build caches, session directories and backup trees full of small files.

03Risk

RiskLow risk
Requirementsdf is part of GNU coreutils; available on every Linux distro. Read-only.
!Warning: You cannot grow the inode table on ext4 without reformatting — the fix is deleting enough small files (find . -xdev -type f | wc -l helps locate the swarm) or moving them elsewhere. Do not confuse IUse% with the byte-based Use% in plain df output.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • df(1) — Arch Manual Pages
    Arch Linux · community · 2026-09-17
    Evidence: Same coreutils page: --inodes reports inode usage per filesystem instead of block usage.
  • df(1) — Debian bookworm
    Debian Manpages · community · 2026-09-17
    Evidence: Documents -i, --inodes: list inode information instead of block usage, with IUsed/IFree/IUse% columns.

Last verified: 2026-09-19 · Category: Files & Folders

06Related solutions