Skip to main content
ncdu (NCurses Disk Usage) is a disk usage analyzer that provides an interactive interface to explore disk space usage.
1

Update package lists

First, update your package lists:
sudo apt update
2

Install ncdu

Install ncdu using the apt package manager:
sudo apt install ncdu -y
3

Scan root directory

Analyze disk usage starting from the root directory:
sudo ncdu /
This will scan the entire filesystem and show you the largest directories.
4

Exit ncdu

To quit ncdu, press q.

Basic ncdu usage

Scan specific directory

ncdu /home/username

Export results to file

ncdu -o report.txt /path/to/directory

Read exported report

ncdu -f report.txt

Exclude certain directories

ncdu --exclude /path/to/exclude /path/to/scan

ncdu navigation

Basic controls

  • ↑/↓ - Navigate directories
  • Enter - Enter directory
  • d - Delete file/directory
  • r - Refresh current directory
  • q - Quit

Advanced features

  • g - Show graph
  • i - Show item info
  • a - Toggle apparent size
  • c - Toggle count

Common use cases

Find large files in home directory

ncdu ~

Analyze disk usage excluding mounted drives

ncdu --exclude /mnt /

Quick scan of current directory

ncdu .

Alternative disk usage tools

Install baobab (GUI)

sudo apt install baobab

Use du command

du -sh /* | sort -hr

Install disk usage analyzer

sudo apt install disk-usage-analyzer

Next Steps

Now that ncdu is installed, you can:
  • Identify space-consuming directories
  • Clean up disk space efficiently
  • Monitor disk usage over time
  • Generate disk usage reports

Build docs developers (and LLMs) love