gdu

Disk usage analyzer written in Go with an interactive terminal UI, non-interactive output, JSON export, database storage, and a web UI.

install

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

add a badge to your README

Maintain gdu? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/gdu.svg)](https://www.trmn.sh/tools/gdu?utm_source=badge)
HTML
<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>