Dust Disk Usage Visualized Fast | Generated by AI

Home 2026.03

What is dust?

dust = A faster, more beautiful alternative to du. It’s a Rust-based CLI tool that shows disk usage in a tree format with color-coded output, progress bars, and intuitive sorting. It’s designed to be prettier and more performant than traditional du, with a simpler command syntax.

Key difference from du: dust is optimized for quick scanning and visual clarity, while du is more “raw” and verbose.


Installation

brew install dust

On Linux:

cargo install du-dust    # If you have Rust/Cargo
sudo apt install dust    # Debian/Ubuntu (some distros)

On macOS with MacPorts:

sudo port install dust

Verify installation:

dust --version

Basic Usage

Scan current directory:

dust

Scan a specific folder:

dust ~/Downloads

Scan home directory:

dust ~

Scan entire system (requires sudo):

sudo dust /

Understanding the Output

When you run dust, you’ll see something like:

 45.6 GiB │████████████████████│ Library
 28.3 GiB │█████████████        │ Projects
 18.7 GiB │██████████           │ Downloads
 12.1 GiB │██████               │ Applications
  8.4 GiB │████                 │ Desktop
  6.2 GiB │███                  │ Documents

What each column means:

By default, dust:


Command-Line Options

Sorting & Display

Flag What It Does
-r Reverse sort (smallest to largest)
-s Sort by size (default)
-n Sort by name alphabetically
-d Sort by date modified
-e Sort by file extension
-c Show with color output (default)
-C Disable color output

Limiting & Filtering

Flag What It Does
-n <num> Show only top N results (e.g., -n 20)
-d <depth> Limit recursion depth (e.g., -d 2)
-X Exclude files matching regex
-i Ignore case-sensitive matching
-z Exclude hidden files

Output & Display

Flag What It Does
-b Print sizes in bytes
-k Print sizes in kilobytes
-m Print sizes in megabytes
-g Print sizes in gigabytes
-T Display total with tree structure
-L Use ASCII instead of Unicode
-p Print percent of parent directory
-A Aggregate small files
-h Show help

Common Usage Patterns

1. Find Largest Folders in Downloads

dust ~/Downloads

Output shows folders ranked by size, largest first.

2. Limit to Top 10 Results

dust -n 10 ~

Shows only the 10 largest items in home directory.

3. Show Only 2 Levels Deep

dust -d 2 ~

Great for getting a high-level overview without drilling too deep:

 85.4 GiB │████████████████████│ Library
          │                    │   ├─ Caches (32.1 GiB)
          │                    │   ├─ Application Support (28.7 GiB)
          │                    │   └─ Logs (12.8 GiB)
 45.2 GiB │███████████         │ Projects
          │                    │   ├─ LargeProject (28.3 GiB)
          │                    │   └─ OtherProject (16.9 GiB)

4. Reverse Sort (Smallest First)

dust -r ~/Downloads

Useful to see what’s actually important vs. taking up space.

5. Exclude Certain Files/Folders

dust -X 'node_modules|\.git' ~

Skip heavy dependencies and version control:

dust -X '\.cache|venv' ~/Projects

6. Show Percentages

dust -p ~

Shows what percentage of the parent each folder represents:

 45.6 GiB (38%) │████████████████████│ Library
 28.3 GiB (24%) │█████████████        │ Projects
 18.7 GiB (16%) │██████████           │ Downloads
 12.1 GiB (10%) │██████               │ Applications

7. Scan Entire System

sudo dust -n 20 /

Top 20 largest directories on your Mac.

8. Show Total Size with Tree

dust -T ~

Includes a summary tree showing cumulative sizes.

9. Ignore Hidden Files

dust -z ~

Excludes dotfiles and hidden folders (faster scan).

10. Custom Unit Display

Show sizes in megabytes:

dust -m ~/Downloads

Or gigabytes:

dust -g ~

Real-World Scenarios

Scenario 1: Clean Up macOS System Bloat

sudo dust -d 2 ~/Library | head -20

Look for:

Then drill deeper:

dust ~/Library/Caches -n 15

Scenario 2: Find Largest Projects

dust -d 2 ~/Projects -n 10

Identify which projects are consuming the most space.

Scenario 3: Check Downloads for Old Installers

dust -d 1 ~/Downloads | grep -E '\.dmg|\.zip|\.iso'

Or just:

dust ~/Downloads -n 20

Scenario 4: Monitor Disk Usage Growth

Scan periodically and compare:

dust -n 15 ~ > ~/Desktop/disk_usage_$(date +%Y%m%d).txt

Compare outputs to see what’s growing.

Scenario 5: Find Old Node/Python Caches

dust -X 'node_modules|__pycache__|\.venv' ~

Avoids showing dependency folders, focuses on actual code/data.

dust ~/Applications

Works great for applications folder without descending into bundles.


Advanced Combinations

Find Large Files in Downloads, Show Top 5

dust ~/Downloads -n 5

Get Full Tree of Largest Item

dust -d 10 ~/Library -n 1

Shows the entire tree structure of the single largest item.

Export Results to File

dust -C ~ > disk_usage.txt

-C disables colors so the text file is clean.

Pretty Print with Percentages and Top 20

dust -p -n 20 ~

Scan Multiple Folders at Once

dust ~/Downloads ~/Projects ~/Library

Shows all three folders’ top-level contents compared.

Find Files Larger Than a Certain Size

dust ~ -d 10 | grep GiB

Filters output to show only items in gigabytes (aka “large”).


dust vs du vs ncdu: Quick Comparison

Feature du dust ncdu
Speed ⚡⚡ Very fast ⚡⚡⚡ Fastest ⚡⚡ Fast
Visual Plain text Beautiful, colored Interactive
Ease Hard (many flags) Easy Easy
Interactive No No ✅ Yes
Sorting Manual Built-in Built-in
Deletion Manual Manual ✅ Direct delete
Best for Scripts/piping Quick overview Exploring & cleaning

When to use each:


Pro Tips

Tip 1: Create an Alias for Common Scans

Add to ~/.zshrc or ~/.bash_profile:

alias dusthome='dust -p ~'
alias dustsys='sudo dust -p /'
alias dustdown='dust ~/Downloads'
alias dustlibs='sudo dust ~/Library -d 2'

Then just:

dustdown

Tip 2: Combine with watch for Real-Time Monitoring

watch -n 5 'dust -n 10 ~'

Updates every 5 seconds (good for monitoring active downloads).

Tip 3: Compare Two Directories

dust ~/OldProject ~/NewProject

Side-by-side comparison of what’s largest.

Tip 4: Find Duplicate-Sized Files

While dust can’t detect actual duplicates, you can spot suspicious patterns:

dust -d 5 ~/Downloads | grep -E '500 MiB|1 GiB'

Tip 5: Check Application Size

dust /Applications -d 1 -n 20

See which apps are taking the most space.

Tip 6: Aggregate Small Files Together

dust -A ~/Downloads

The -A flag combines small items into “Other” for cleaner output.


Combining dust with Other Tools

Use with grep to Filter

Show only items with “GiB” (large items):

dust ~ | grep GiB

Pipe to head for Top N

dust ~ | head -15

Find Large Caches

dust ~/Library/Caches -d 3 -n 20

Check Specific File Types

dust ~ -d 5 | grep -E '\.iso|\.dmg|\.zip'

Troubleshooting

dust takes too long?

dust -z -X 'node_modules|\.git' ~

Skip hidden files and large dependency folders.

Want to exclude multiple patterns?

dust -X 'node_modules|\.git|\.cache|__pycache__' ~

Permission denied?

sudo dust /

Want plain text output (no colors)?

dust -C ~ > results.txt

Quick Cheat Sheet

dust                           # Scan current dir
dust ~                         # Scan home
dust ~/Downloads               # Scan specific folder
dust -n 20 ~                   # Show top 20
dust -d 2 ~                    # Show 2 levels deep
dust -p ~                      # Show percentages
dust -r ~/Downloads            # Reverse sort (smallest first)
dust -X 'node_modules|\.git' ~ # Exclude patterns
dust -c ~/Library/Caches       # Count files (not available, but useful combo)
sudo dust /                    # Scan entire system
dust -C ~ > output.txt         # Export without colors

Summary

dust is perfect for:

Use dust when you want speed and readability, use ncdu when you want to interactively explore and delete, and use du when you’re scripting or need maximum control.

Let me know if you have questions!


Back Donate