Disk usage analyzer that provides fast, parallel directory scanning with an optional interactive TUI for file deletion
dua (Disk Usage Analyzer) is a command-line tool that analyzes disk space usage within directories. It performs parallel directory traversal by default to maximize SSD performance and provide results quickly. The tool can operate in two modes: a standard command-line mode that displays disk usage statistics, and an interactive terminal user interface (TUI) mode that allows users to explore directory structures and delete files directly.
The interactive mode includes multi-stage deletion protection to prevent accidental file removal, making it suitable for both exploration and cleanup tasks. Users can navigate through directories, view space usage statistics, and selectively delete files or directories. The tool supports keyboard shortcuts accessible via the help system in interactive mode.
dua reads optional configuration from OS-specific config directories and supports customization of keyboard behavior, such as whether the Esc key navigates to parent directories or quits the application. The tool is built with crossterm as its terminal backend and uses jwalk for efficient directory traversal. It supports most Unix-like systems, macOS, and Windows, with some platform-specific installation options and feature variations.
# via Homebrew
brew install dua-cli
# via Cargo
cargo install dua-cli
# via Arch Linux
sudo pacman -S dua-cli