Analyze Disk Usage Interactively with ncdu

ncdu scans a directory tree, then lets you browse sizes, navigate, and delete space hogs with one keypress.

LinuxncducleanupdiskLow risk
Run `ncdu /` (or `sudo ncdu /` to include system dirs) to browse disk usage interactively.

01Command

Command
$ 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

RiskLow risk
Requirementsncdu installed (apt install ncdu / dnf install ncdu)

04Undo

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

05Sources

  • ncdu(1) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: 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