5.6 KiB
% NCurses Disk Usage
Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don't have an entire graphical setup available, but it is a useful tool even on regular desktop systems. Ncdu aims to be fast, simple and easy to use, and should be able to run in any minimal POSIX-like environment with ncurses installed.
NEWS FLASH! Ncdu 2.5 adds support for parallel scanning, but it's not
(yet?) enabled by default. To give it a try, run with -t8 to scan with 8
threads. If you're running an unusual setup, such as networked storage, odd
filesystems, complex RAID configurations, etc, I'd love to hear about the
performance impact of this new feature. Feedback is welcome on the issue
tracker or through mail @
projects@yorhel.nl.
If you want to run benchmarks, -0 --quit-after-scan can be useful to disable
the browser interface, or run with -0o/dev/null to benchmark JSON export.
Download 
- Static binaries
- Convenient static binaries for Linux. Download, extract and run; no compilation or installation necessary: x86 - x86_64 - ARM - AArch64.
- Zig version (stable)
- 2.5 (2024-07-24 - ncdu-2.5.tar.gz - changes)
Requires Zig 0.12 or 0.13.
The Zig language and compiler are still somewhat unstable, use the ncdu 1.x branch if this does not work for you or if you need a more stable compilation environment.
- C version (LTS)
- 1.20 (2024-04-21 - ncdu-1.20.tar.gz - changes)
Lags a bit behind on the 2.x version in terms of features and performance, but is still being maintained and perfectly usable.
- Development version
- The most recent code is available on git:
git clone git://g.blicky.net/ncdu.git/The repository is also available for online browsing on Forgejo and cgit. The 'master' branch represents the C version, the Zig version can be found in the 'zig' branch.
- License
- MIT.
Packages and ports
Ncdu has been packaged for quite a few systems, here's a list of the ones I am aware of:
AIX - Alpine Linux (2) - ALT Linux - Arch Linux - CRUX - Cygwin - Debian - Fedora - FreeBSD - Frugalware - Gentoo (-bin) - GNU Guix - NixOS - OpenBSD - openSUSE. OpenWRT - MacOS (Fink - Homebrew - MacPorts) - Solaris - Slackware - Ubuntu - Void Linux.
Packages for NetBSD, DragonFlyBSD, MirBSD and others can be found on pkgsrc.
Similar projects
There's no shortage of alternatives to ncdu nowadays. In no particular order:
- Duc - Multiple user interfaces, C, scales beyond directories that fit in RAM.
- gt5 - TUI/HTML, also supports diffing.
- gdu - TUI/CLI, Go, supports ncdu JSON export and import.
- dua - CLI, Rust.
- pdu - CLI, Rust.
- diskonaut - TUI, Rust, treemap.
- dut, CLI, C.
- godu - TUI, Go, slightly different browser UI.
- tdu - CLI, Go, supports ncdu JSON export.
- TreeSize - GTK, using a treeview.
- Baobab - GTK, using pie-charts, a treeview and a treemap. Comes with GNOME.
- GdMap - GTK, treemap.
- Filelight - KDE, using pie-charts.
- QDirStat - Qt, treemap.
- K4DirStat - Qt, treemap.
- xdiskusage - FLTK, with a treemap display.
- fsv - 3D visualization.