Directory Usage STatistics sYstem
A fast, safe, terminal-based directory size analyzer — like ncdu or TreeSize, built with Go and Bubble Tea. Scan a directory, see where the space went, and reclaim it without leaving the terminal.
- Parallel scanning — a bounded worker pool reads directories concurrently (25–70× faster than a sequential walk in our benchmarks); metadata is reused straight from the directory read where the OS provides it (free on Windows), elsewhere one
lstatper file - Safe by default — symlinks, junctions and other reparse points are never followed: no cycles, no double counting, and deletes can never reach outside the scanned tree
- Delete to trash —
dmoves items to the Recycle Bin (Windows) / Trash (macOS, freedesktop.org spec on Linux);Ddeletes permanently, and large permanent deletes require typing the item's name - Live scan progress — smooth spinner, live file/dir/byte counters, the directory currently being read, and the largest completed items so far
- Readable bars — size bars scale to the largest sibling with ⅛-cell resolution, so relative sizes stay visible even in flat directories
- Item counts — every directory shows its cumulative number of descendants
- ncdu-style keymap — paging,
g/G, sort by size or name with same-key reversal, rescan, help overlay, mouse wheel - Error visibility — unreadable directories are marked with
!and counted in the header instead of silently shown as empty - Adapts to your terminal — light and dark color schemes, responsive layout, name truncation, cursor marker that survives
NO_COLOR - Human-readable IEC sizes — B, KiB, MiB, GiB, TiB (the math is base-1024, so the labels say so)
- Honest accounting — on Linux/macOS sizes are allocated disk usage (
st_blocks, likedu), so sparse files and/procpseudo-files don't inflate totals; Windows uses apparent size
Grab the archive for your platform from the Releases page (e.g. dusty_Linux_x86_64.tar.gz, dusty_Darwin_arm64.tar.gz, dusty_Windows_x86_64.zip).
Linux/macOS:
curl -L https://github.com/twiddles/dusty/releases/latest/download/dusty_Linux_x86_64.tar.gz | tar -xz dusty
sudo mv dusty /usr/local/bin/Windows:
Download the .zip, extract dusty.exe, and add it to your PATH.
go install github.com/twiddles/dusty@latestgit clone https://github.com/twiddles/dusty.git
cd dusty
go build -o dustydusty # scan the current directory
dusty ~/Documents # scan a specific directory
dusty --exclude node_modules --exclude .git ~/projects
dusty --no-hidden ~ # skip dot-files and dot-directories
dusty --threads 64 /mnt/nas # more concurrent reads for high-latency storage
dusty --version| Flag | Effect |
|---|---|
--exclude <glob> |
Skip entries whose name matches the glob (repeatable) |
--no-hidden |
Skip hidden (dot-prefixed) files and directories |
--threads <n> |
Max concurrent directory reads (default: 4×CPU; try 64+ for network drives, 2–4 for spinning disks) |
--version |
Print version and exit |
| Key | Action |
|---|---|
↑ / k, ↓ / j |
Move cursor |
→ / Enter / l |
Enter selected directory |
← / Backspace / h |
Go back to parent directory |
PgUp / PgDn |
Page up / down |
g / Home, G / End |
Jump to top / bottom |
~ |
Jump back to the scan root |
d |
Move selected item to trash (with confirmation) |
D |
Delete permanently (large items require typing the name) |
s |
Sort by size (press again to reverse) |
n |
Sort by name (press again to reverse) |
r |
Rescan the current directory |
? |
Help overlay |
| Mouse wheel | Scroll |
q / Ctrl+C |
Quit |
▸ 285.4 MiB 23.1% ▕█████████▎ ▏ 1,204 node_modules/
size · percent of parent · bar relative to the largest sibling · item count · name.
Marks: / directory · @ symlink (not followed) · ! unreadable.
- Language: Go 1.24+
- UI: Bubble Tea + Lip Gloss
- Scanner: bounded-concurrency directory walker; every directory is scanned by exactly one goroutine and progress is published only through atomic counters and immutable snapshots, so the UI and scanner share no mutable state
- Memory: nodes store base names only (full paths are reconstructed on demand), keeping large trees cheap
- Hard links are counted once per link (no inode deduplication)
- On Windows, sizes are apparent (logical) sizes — sparse or NTFS-compressed files may show larger than the space they occupy; on Linux/macOS allocated disk usage is reported instead
- Trash requires the target to be on the same volume as the trash directory on macOS/Linux; cross-volume items report a clear error and can be deleted permanently with
D - On Windows volumes without a Recycle Bin (network drives, some removable media),
drefuses rather than silently deleting — useDthere
Dusty aims to be small, safe and fast — not WizTree. Raw MFT parsing, archive browsing, export formats, config files and treemaps are intentionally out of scope.
make build # Build for current platform
make test # Run tests
make lint # Format and vet
make help # All targetsReleases are cut by GoReleaser on v* tags (.github/workflows/goreleaser.yml).
MIT License — see LICENSE.
Built with Bubble Tea and Lip Gloss by Charm.
