Skip to content
Latchkey

df: Usage, Options & Common CI Errors

df shows how full each mounted filesystem is.

df is the first command you run when a job dies with "No space left on device". It reveals both byte exhaustion and the less obvious inode exhaustion that many tools forget to check.

What it does

df reports total, used, and available space for mounted filesystems, by device or mount point. With -i it reports inode usage instead of bytes - a separate limit that can run out while space remains.

Common usage

Terminal
df -h                          # human-readable sizes
df -h /                        # a specific mount
df -i                          # inode usage
df -h --output=source,pcent,target
df -hT                         # include filesystem type

Options

FlagWhat it does
-h / -HHuman-readable (1024 / 1000 base)
-iShow inode usage instead of blocks
-TShow filesystem type
--output=...Choose columns (GNU)
-x / -t <type>Exclude / limit to a fs type

Common errors in CI

When a step fails with "No space left on device" (ENOSPC), df -h shows which mount is full - often /, /tmp, or the Docker data dir. If df -h shows free space but writes still fail, run df -i: inodes can be exhausted by many tiny files even with bytes to spare. Common fixes: docker system prune -af, clear /tmp, remove old caches, or use a runner with a larger disk.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →