disk full but df says there is room
"No space left on device" with free gigabytes: the disk is out of inodes, the slots for files. Find the folder with too many small files.
Steps
-
df -hthe space left
-
df -ithe inodes left: IUse% at 100% is the problem
-
sudo du --inodes -xd 1 / | sort -n | tailthe folders with the most files, at the top of the disk (GNU)
-
sudo find /var -xdev -type f | cut -d/ -f2-4 | sort | uniq -c | sort -n | tailwhere under /var the files are
Notes
- The usual ones: session or cache folders, mail queues, old kernels' headers. Delete what you know is safe.
Commands used
dfdufind
Each has a page in lore: lore df opens it.
Related recipes
- create a large fileMake a file of a given size, for testing disks, uploads or swap.
- find big filesFind the files that take the most room, on a whole disk or in a folder.
- free disk spaceFind what fills a disk, then clear what is safe to clear: old package files, logs, caches.
- see the size of files and foldersHow much room each file and folder takes, here or anywhere, biggest last.