NCurses Disk Usage
Ncdu is a disk usage analyzer with a text-mode user 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, easy to use, and should be able to run on any POSIX-like system.
Notable updates
- Parallel scanning
-
Ncdu 2.5 adds support for parallel scanning, but it’s not 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.1 Feedback is welcome on the issue tracker or to projects@yorhel.nl. - Binary export
-
Ncdu 2.6 adds a new binary export format that better works with parallel
scanning, offers built-in compression and supports browsing directory
trees that are too large to fit in memory. To give it a try, use the
-O
flag instead of-o
. - Colors
-
Ncdu has had color support since version 1.13. Colors were enabled by
default in 1.17 and 2.0, and then later disabled again in 1.20 and 2.4
because the text was not legible in all terminal configurations. If you
do prefer the colors, add
--color=dark
to your config file. Maybe at some point in the future we’ll have colors that are readable in every setup.
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.7 (2024-11-19 - ncdu-2.7.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.21 (2024-11-19 - ncdu-1.21.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:
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.git clone git://g.blicky.net/ncdu.git/
- 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.
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.↩︎