explaingit

byron/dua-cli

5,846RustAudience · developerComplexity · 1/5Setup · easy

TLDR

dua is a fast command-line tool that shows how much disk space your files and folders use, with an interactive terminal browser where you can find and safely delete large files.

Mindmap

mindmap
  root((dua-cli))
    What it does
      Show disk usage
      Parallel scan
      Interactive delete
    Modes
      Command-line report
      Interactive terminal UI
    Install
      Homebrew MacPorts
      Scoop WinGet
      Cargo Linux packages
    Limits
      No symlink display
      Dark terminal preferred
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Quickly find which folders are consuming the most disk space on a server or laptop.

USE CASE 2

Interactively browse directory sizes in the terminal and delete large unnecessary files with confirmation prompts.

USE CASE 3

Scan a large project directory in parallel for fast results on an SSD-based system.

Tech stack

Rust

Getting it running

Difficulty · easy Time to first run · 5min
License not explicitly stated in the explanation.

In plain English

dua, short for Disk Usage Analyzer, is a command-line tool that shows how much space files and directories are taking up on your computer. It is written in Rust and designed to be fast: it scans directories in parallel, which means it reads multiple folders at the same time rather than one by one, making better use of a solid-state drive. Running dua with no arguments reports the disk usage of the current folder. There is also an interactive mode, launched with dua i, that opens a visual interface in the terminal. In interactive mode you can browse through directories, see sizes at a glance, and select files or folders to delete. The README notes that the deletion flow has multiple confirmation steps to reduce the chance of accidental data loss. The tool is available on macOS via Homebrew and MacPorts, on Windows via Scoop and WinGet, and on several Linux distributions including Fedora, Arch Linux, Void Linux, and NixOS through their respective package managers. It can also be installed with Cargo, which is Rust's package manager, on any platform where Rust is set up. The README mentions a few known limitations: symbolic links are not shown when running dua without a path argument, the interactive interface looks best on dark-background terminals, and file names that are too long get cut off rather than wrapped. The project lists several similar tools in the README for comparison, including ncdu and dust.

Copy-paste prompts

Prompt 1
I installed dua-cli on my Mac with Homebrew. Show me how to use the interactive mode to find and delete the largest folders in my home directory.
Prompt 2
How do I use dua to scan a specific directory and output a sorted list of folder sizes without entering interactive mode?
Prompt 3
Using dua, how do I quickly identify which node_modules or build output folders are taking up the most space across my projects directory?
Prompt 4
Compare dua-cli to ncdu for finding and cleaning up large files on a Linux server, what are the key differences?
Open on GitHub → Explain another repo

← byron on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.