Analyze Disk Usage Interactively with ncdu
ncdu scans a directory tree, then lets you browse sizes, navigate, and delete space hogs with one keypress.
01Command
$ ncdu /02What it does
Directories are sorted largest-first automatically, so you drill down toward the culprit instead of writing du/sort pipelines. Press `d` to delete the selected item, `n` to sort by name, `e` to show hidden files, and `i` for details. For servers, `ncdu -o /tmp/scan.gz /` exports a scan you can review elsewhere with `ncdu -f`, useful when the target machine is too loaded to browse live.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ncdu(1) - Linux manual pageEvidence: ncdu is a curses-based disk usage analyzer; pressing d within the browser deletes the selected file or directory, and -o exports the scan.
Last verified: 2026-09-17 · Category: Files & Folders
06Related solutions
autoremove deletes no-longer-needed dependency packages, and clean wipes the downloaded .deb cache in /var/cache/apt/archives.
Check how much space the binary journal consumes and permanently trim it by size, age, or file count.
When df says full but du disagrees, open-but-deleted files are the usual culprit; lsof +L1 lists them with the process holding each.