CLI tool
bootandy/dust avatar
bootandy/dust

dust: A Smarter Disk Usage CLI in Rust

A more intuitive version of du in rust

12,434 stars295 forksRustApache-2.0

At a glance

What is it?
dust is a Rust command-line replacement for `du` that prints a sorted tree of directory sizes with colored bars showing the hierarchy, avoiding the need for separate `sort` and `head` invocations to find where disk space is going.
Who is it for?
dust is the right tool for engineers and system administrators who regularly need to find where disk space has gone and want a visual tree output without piping `du` into `sort`. It is not a replacement for interactive disk usage browsers like ncdu that let you navigate and delete interactively within the tool.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 13 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The Problem with Plain du

The standard `du` command produces unsorted, flat output. To find the largest directories, users typically pipe `du -d 1 -h` into `sort -h`, optionally followed by `tail` or `head`. That pipeline requires remembering flag combinations, and the output still does not make it visually obvious which parent directories contain the large entries.

dust solves this by doing the sorting and tree-building itself. It lists the largest subdirectories in descending size order and uses a horizontal bar alongside each entry to show what fraction of the selected root that entry occupies. A shadow bar extends from each entry up to the size of its parent directory, so you can see at a glance that a large entry is actually nested inside an even larger one without losing track of the hierarchy.

The name reflects the implementation: `du + rust = dust`. The package name on crates.io is `du-dust`.

How dust Traverses and Displays

By default, dust displays a number of entries approximately equal to the terminal height. It recurses into directories intelligently, picking paths that contribute the most to total size. This means you never see pages of output for directories that contain hundreds of tiny files; dust collapses the small ones and shows the large ones clearly.

The colored bars serve two purposes. The bar width represents disk usage as a fraction of the root directory's total. The color indicates parent-child relationships: entries in a similar shade are siblings inside the same parent, while a lighter shadow extending from an entry marks the cumulative size of that parent. The README's demo illustrates this with a `src` folder taking 44% of a web application's total size, with subdirectories of `src` showing bars that visually track back to the `src` entry.

dust handles hard links correctly by default. When a file has multiple hard links, `du` counts its allocated blocks once per hard link entry, which can overcount space. dust counts hard-linked files only once. The `-s` flag reverses this behavior and reports apparent size (the sum of file lengths regardless of hard-link deduplication), which matches what `du -s` reports and is useful when comparing against a remote file listing.

By default, dust respects `.gitignore` files. Files and directories listed in `.gitignore` are excluded from the traversal. Toggle this with `alt+i` while running interactively, or use the CLI flag documented in the usage output.

Installing dust

dust provides the widest set of installation paths of any CLI tool in this category. The quick install script covers Linux, macOS, and Windows:

bash
curl -sSfL https://raw.githubusercontent.com/bootandy/dust/refs/heads/master/install.sh | sh

On macOS and Linux via Homebrew:

bash
brew install dust

On Fedora Linux:

bash
sudo dnf install du-dust

On Ubuntu and systems that support Snap:

bash
snap install dust

Note: the snap version can only access files under `/home`. The project's issue tracker documents this as a snap confinement limitation. If you need to inspect paths outside `/home`, use a different installation method.

On Windows with Scoop:

bash
scoop install dust

Windows users with the GNU build should be aware that the MSVC build requires `VCRUNTIME140.dll`. The project documentation links to the appropriate Microsoft redistributable.

Via Cargo (from source):

bash
cargo install du-dust

Binaries are also available directly from the GitHub releases page as `.tar.gz` archives. Unzip with `tar -xvf` and move the `dust` binary to a directory on your PATH.

Flags and Config File

dust offers a compact set of flags that cover the most common use cases:

code
Usage: dust
Usage: dust <dir>
Usage: dust -p (full-path - Show fullpath of the subdirectories)
Usage: dust -s (apparent-size - shows the length of the file as opposed to the amount of disk space it uses)
Usage: dust -n 30  (Shows 30 directories instead of the default [default is terminal height])
Usage: dust -d 3  (Shows 3 levels of subdirectories)
Usage: dust -D (Show only directories (eg dust -D))
Usage: dust -F (Show only files - finds your largest files)
Usage: dust -r (reverse order of output)
Usage: dust -o si/b/kb/kib/mb/mib/gb/gib (si - p

The `-n` flag controls how many entries appear. Unlike `head -n`, dust's `-n` selects the largest N entries from the full tree, not the first N lines. `dust -n 90` shows the 90 largest entries across all depth levels.

The `-w` flag (or `--whale-spotting`) switches to a mode tailored for finding large consumers. The README names this mode explicitly: it makes identifying files or folders that take disproportionate space easier.

For launching with common flags automatically, dust supports a config file:

toml
reverse=true
limit-filesystem=true

The config file lives at `$XDG_CONFIG_HOME/dust/config.toml`, falling back to `~/.config/dust/config.toml` or `~/.dust.toml`. Config keys use the long flag name in kebab-case. A fuller sample lives at `config/config.toml` in the repository.

Sorting by date rather than size is available with `--sort-by-date`. Running `br --sort-by-date ~` (note: the README text actually says `dust --sort-by-date`) scans the entire home directory and shows what was modified most recently, which helps track down log files or caches that were recently updated to a large size.

Finding the Largest Files Across the Tree

One concrete advantage over ncdu and baobab that the README calls out is dust's treatment of large files nested inside directories. With most directory browsers, a directory can appear large because it contains one very large file, but the browser shows only directory-level totals. dust shows both directories and the individual large files within them in the same tree.

For example: if directory A is 500 MB and directory B is 300 MB, but B contains a single 280 MB file while A's size comes from hundreds of small files, dust will show the 280 MB file visibly in the tree under B. ncdu shows only that B is 300 MB total; you have to navigate into B manually to see the large file.

The `-F` flag restricts output to files only, which is equivalent to `find . -type f | xargs du | sort -h | tail -n 20` but faster and with tree context preserved.

Filesystem-level usage is also accessible. Typing `:fs` inside broot (the README mentions this in a cross-reference context, but for dust the flag `--limit-filesystem` prevents dust from crossing filesystem mount points) shows aggregate stats per mounted filesystem.

Sizes and directory counts are computed using the `rayon` crate for parallel traversal, which means multi-core systems see full CPU utilization during large directory scans.

Where dust Falls Short

dust is a reporting tool, not an interactive deletion tool. It shows what is large but provides no built-in mechanism to delete directories or files. After identifying large entries with dust, you still need `rm`, a file manager, or another tool to act on them.

The snap confinement is a real limitation on Ubuntu and its derivatives. System administrators who need to inspect `/var`, `/opt`, or other directories outside `/home` cannot use the snap package. They need to install via the release binary, cargo, or an alternative package manager.

dust does not support network filesystems well in all configurations. The `--limit-filesystem` option prevents it from crossing filesystem boundaries, which is the safe setting when NFS or CIFS mounts are in the path. Without this flag, dust will attempt to traverse mounted network directories and may block or produce misleading results if those mounts have latency.

There is no recursive watch mode. dust runs once, prints a report, and exits. It is not a background daemon that alerts when disk usage changes.

Comparing dust to ncdu and dua

The README lists several alternatives: ncdu, dutree, dua, pdu, and dirstat-rs, as well as the manual pipeline `du -d 1 -h | sort -h`.

ncdu is a terminal-based interactive tool written in C. It provides a navigable interface where you can move through directories with arrow keys and delete entries from within the tool. This makes ncdu better for interactive cleanup sessions where you want to find and immediately remove large files in a single workflow. dust is better for getting a fast read-only overview.

dua (disk usage analyzer) is another Rust tool with both a non-interactive CLI mode and an optional interactive terminal UI. Its interactive mode is more comparable to ncdu. dust's advantage over dua is its visual bar representation, which shows the hierarchical relationship between parent and child sizes without requiring navigation.

The plain `du -d 1 -h | sort -h` pipeline from the README works everywhere without installing anything. Its disadvantage is that it shows only one level deep, requires manual re-invocation to drill into subdirectories, and produces no visual cues about where large entries sit relative to their parents.

dust's Apache-2.0 license places no restrictions on commercial use or distribution. The crates.io package name `du-dust` must be used when installing via `cargo install`.

Editorial conclusion

dust is the right tool for engineers and system administrators who regularly need to find where disk space has gone and want a visual tree output without piping `du` into `sort`. It is not a replacement for interactive disk usage browsers like ncdu that let you navigate and delete interactively within the tool. Before adopting it, verify that the snap installation constraint (home directory only) does not apply to your environment, and note that the Apache-2.0 license places no restrictions on commercial use.

Frequently asked questions

Is dust faster than du?

The README does not include benchmark comparisons between dust and du. dust uses Rayon for parallel directory traversal, which should utilize multiple CPU cores, but no specific speed figures are documented in the repository.

What is du-dust?

du-dust is the package name for dust on crates.io and in some package managers. Dust is a Rust command-line tool that replaces the standard `du` utility with sorted, tree-formatted disk usage output. Install it with `cargo install du-dust` or via brew, dnf, snap, or scoop.

What is dust in Linux?

On Linux, dust (the bootandy/dust project) is a disk usage reporting command that shows which directories consume the most space as a sorted tree with colored bars. It is installed via `cargo install du-dust`, `brew install dust`, `sudo dnf install du-dust`, or `snap install dust`.

Official sources

  1. bootandy/dust on GitHub
  2. Issues
  3. License: Apache-2.0
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/bootandy-dust.svg)](https://hysenlabs.com/projects/bootandy-dust)