ncdu

Updated

September 4, 2026

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 ncdu

Syntax

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.ncdu

Notes & Pitfalls

  • Needs read permission; use sudo for 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