ncdu
Overview
ncdu (NCurses Disk Usage) is an interactive du for finding what consumes space. Faster feedback than reading raw du trees; great on full root filesystems.
sudo apt install ncduSyntax
ncdu [options] [path]Common Options
| Option | Description |
|---|---|
-x |
One filesystem only |
-r |
Read-only (no delete) |
-o file |
Export scan |
-f file |
Load export |
-e |
Extended info (more stat calls) |
--exclude pattern |
Skip paths |
Examples with Explanations
Scan root (one FS)
sudo ncdu -x /Navigate with arrows; d deletes (if not -r); q quits.
Home directory
ncdu -x "$HOME"Export for later / remote analysis
sudo ncdu -x -o /tmp/root.ncdu /
ncdu -f /tmp/root.ncduNotes & Pitfalls
- Needs read permission; use
sudofor system trees.
- Exclude bind mounts and huge network mounts with
-x/--exclude.
- Deleting from ncdu is still delete — careful on production.
Additional Resources
man ncdu