ncdu Cheatsheet

Disk usage.

Overview

ncdu (NCurses Disk Usage) is the interactive disk-usage analyzer that turns "the disk is full" into a specific path within seconds. The TUI lets the operator drill into directories, sort by size, and delete from the UI. Fluency with the keyboard shortcuts is what makes ncdu fast under incident-time pressure when "df shows 95 percent" is all you have.

The approach

The practical approach is to scan from a specific path (ncdu /var rather than ncdu / on a host with mounted filesystems), use -x to stay on one filesystem, save scans with -o for analysis on remote hosts where running ncdu interactively is hard, sort by size to find the largest items, and use the ‘d’ key with confirmation for fast cleanup with safety.

Why this compounds

ncdu fluency compounds across incidents. Each scan teaches the file-system layout for that host; each cleanup turns disk-full from an incident into a 5-minute investigation. The team builds a muscle for disk-usage debugging that pays off every time pgsql logs fill /var or a runaway log drowns /opt.

ncdu fluency is an operational discipline that pays off across years. Nova AI Ops integrates with system telemetry, surfaces disk patterns, and supports the team’s investigation discipline.