Skip to content

How to hunt down large files and analyze disk usage using NCDU

Basic Usage

Launch the disk usage analyzer in the current directory.

ncdu

Launch the disk usage analyzer for a specific directory.

ncdu /path/to/directory

Scan the entire root file system (excluding other mounted file systems to prevent scanning external drives or network shares).

ncdu -x /

Advanced Scanning and Exporting

Scan a directory quietly (reduces UI updates for faster scanning of large file systems).

ncdu -q /path/to/directory

Scan a directory and export the results to a file for later viewing.

ncdu -o ncdu_export.file /path/to/directory

Load and view previously exported disk usage results.

ncdu -f ncdu_export.file

Scan a directory with extended information (enables extended mode).

ncdu -e /path/to/directory

Scan a directory and enable color output (if supported by terminal).

ncdu --color dark /path/to/directory

Interactive UI Keybindings (Inside NCDU)

Delete the currently selected file or directory.

d

Toggle the display of hidden files.

h

Sort the list by file/directory name.

n

Sort the list by disk usage size.

s

Toggle between displaying apparent size and disk usage.

a

Show information about the currently selected item.

i

Quit the application.

q