How to find what fills a Linux disk with du and the interactive ncdu, with options that stay on one file system.
du (disk usage) is the standard Linux command that reports how much space files and directories use; ncdu is an interactive, ncurses-based alternative that lets you browse the results and delete items. Together with df, which shows free space per file system, they are the usual way to find what fills a disk.
'du -sh /var' prints one human-readable total. 'du -h --max-depth=1 /' lists the size of each top-level directory. '-x' stays on one file system, so mounted disks and /proc are skipped.
Piping to sort finds the biggest items: 'du -xh --max-depth=1 / | sort -h'.
'ncdu -x /' scans the root file system and opens a browsable list sorted by size. Arrow keys move, Enter opens a folder, 'd' deletes the selected item after confirmation, 'q' quits. ncdu is usually installed from the distribution's package (for example 'apt install ncdu').
If df reports a full disk but du finds less, a deleted file may still be held open by a running process. The space returns when that process closes the file or restarts.
df -hsudo du -xh --max-depth=1 / | sort -hsudo ncdu -x //var/lib.Note: RainServer offers monitoring and safe cleanup for Linux servers; it shows what will change and asks first.
Last updated: 2026-10-08
How to read df output, why Use% can reach 100% before Avail is zero for normal users, and how to check inodes with df -i.
What an inode is, how to see inode usage with df -i, and how to find directories with millions of small files.
How to use find to list big or old files on Linux, preview them safely and delete only what you checked.