gdu
Disk usage analyzer written in Go with an interactive terminal UI, non-interactive output, JSON export, database storage, and a web UI.
gdu is a disk usage analyzer written in Go. It scans directories in parallel and presents sizes in an interactive console interface, where you can navigate with arrow keys or vim-style keys (j/k/h/l), sort by name or size, and show item counts. It supports parallel scanning as well as a --sequential mode for rotating disks.
From the interactive view you can delete the selected file or directory (d), move it to trash (D, with an optional --trash-command to use your own trash tool), or empty a directory (e). --no-delete, --no-view-file and --no-spawn-shell disable write operations, file viewing and shell spawning. Several directories can be passed at once and appear under a virtual (multiple) top level. gdu -d lists all mounted disks.
For scripting, -n prints stats without starting the TUI. -s shows only a total, -t N shows the top N largest files, and --depth limits the printed tree. Filtering options include ignoring paths by name (-i), regex pattern (-I), pattern file (-X) or .gitignore-style file (-G). You can also filter by file type (-T/-E) and by mtime (--max-age, --min-age, --since, --until), and -x avoids crossing filesystem boundaries.
Analysis results can be exported as JSON (-o) and re-imported later (-f). They can also be stored in SQLite or BadgerDB (--db) and reloaded with -r. --web serves a browser interface instead of the terminal UI, and --archive-browsing allows browsing zip/jar/tar archives. gdu is useful for developers and sysadmins who need to find what is using space on a machine.
Installation
# via Homebrew (binary: gdu-go)
brew install -f gdu
# via Go
go install github.com/dundee/gdu/v5/cmd/gdu@latest
# via Conda
conda install gdu
Alternatives & related tools
viddy
Enhanced watch command replacement with time machine mode, diff highlighting, and vim-like navigation
stern
Kubernetes log tailing tool that aggregates logs from multiple pods and containers with regex filtering and color coding
tufw
Terminal user interface for managing ufw firewall rules with add, edit, and remove functionality
kure
Command-line password manager with AES-GCM encryption and offline operation
ssm
Terminal UI for managing and connecting to SSH hosts with vim-style navigation and tagging
add a badge to your README
Maintain gdu? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/gdu?utm_source=badge)<a href="https://www.trmn.sh/tools/gdu?utm_source=badge"><img src="https://www.trmn.sh/badge/gdu.svg" alt="Featured on trmn" height="20"></a>