Parallel disk usage analyzer with interactive TUI mode for exploring and deleting files to free space
dua (Disk Usage Analyzer) is a command-line tool that analyzes disk space usage of directories using parallel processing to maximize SSD performance. It provides faster disk scanning than traditional tools by leveraging multi-threading and can optionally delete files more quickly than rm.
The tool operates in two modes: a standard CLI mode for basic disk usage reporting with commands like dua or dua *, and an interactive TUI mode launched with dua i that allows users to explore directory structures visually. The interactive mode includes a multi-stage deletion process designed to prevent accidental file removal, making it suitable for both exploration and cleanup tasks.
dua is built in Rust and uses the jwalk crate for directory traversal. It supports cross-platform operation through the crossterm backend and can handle up to 2^32 - 1 entries in interactive mode, requiring approximately 60MB of memory for 1 million entries. The tool handles symbolic links by pruning them when used as traversal roots but displays them when encountered within directory structures.
# via Homebrew
brew install dua-cli
# via Cargo
cargo install dua-cli
# via Fedora
sudo dnf install dua-cli
# via Arch Linux
sudo pacman -S dua-cli