dua
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.
Installation
# via Homebrew
brew install dua-cli
# via Cargo
cargo install dua-cli
# via Arch Linux
sudo pacman -S dua-cli
Alternatives & related tools
xplr
Terminal-based file explorer with Lua scripting, keyboard controls, and plugin system for command-line integration
pdfcpu
PDF processing library and CLI written in Go for validating, merging, splitting, encrypting, stamping, signing and extracting content from PDFs.
ouch
CLI tool for compressing and decompressing files across 14+ formats with automatic format detection
doxx
Terminal-native .docx document viewer with formatting, search, and export capabilities
npkill
Interactive TUI that scans for node_modules directories, shows their size and last modification, and lets you delete selected ones to free disk space.
add a badge to your README
Maintain dua? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/dua?utm_source=badge)<a href="https://www.trmn.sh/tools/dua?utm_source=badge"><img src="https://www.trmn.sh/badge/dua.svg" alt="Featured on trmn" height="20"></a>