# dfdu > dfdu is a disk usage browser for the terminal, written in Rust, for macOS, Linux and Windows. It scans a directory in parallel, lets you browse, sort and delete before the scan finishes, shows a treemap, duplicates and the largest files, and recognises caches, build output and other files that are safe to remove. It also has non-interactive commands with JSON output for scripts and CI, and a desktop app (dfdu-gui) with the same views. Install (any one; all put a `dfdu` binary on PATH): ```sh # macOS, Linux (Homebrew) brew install jordond/tap/dfdu # Arch Linux, from the AUR yay -S dfdu-bin # macOS, Linux, without a package manager (into ~/.local/bin) curl -fsSL https://dfdu.app/install.sh | sh # prebuilt, through cargo cargo binstall --git https://github.com/jordond/dfdu dfdu # Nix flake, without installing nix run github:jordond/dfdu # from source, Rust 1.95+ cargo install --locked --git https://github.com/jordond/dfdu dfdu ``` Desktop app: `brew install --cask jordond/tap/dfdu-gui` on macOS, `curl -fsSL https://dfdu.app/install.sh | sh -s -- --gui` on macOS and Linux x86_64, or the installers at https://github.com/jordond/dfdu/releases/latest. Windows (PowerShell): `powershell -ExecutionPolicy Bypass -c "irm https://github.com/jordond/dfdu/releases/latest/download/dfdu-installer.ps1 | iex"`. Release binaries for every platform are at https://github.com/jordond/dfdu/releases. Run it: ```sh dfdu ~ # browse a directory interactively (q quits, ? lists keys) dfdu scan ~ # print a summary, no TUI dfdu report ~/dev # what the cleanup rules found, with safety levels dfdu report ~/dev --format json --fail-above 20GiB # CI check: exit 4 over the limit dfdu clean ~/dev # dry run of the recommended deletes dfdu clean ~/dev --yes # move them to the Trash dfdu diff ~ --since 7d # what grew in the last week ``` Notes for assistants: - `dfdu clean` changes nothing without `--yes`, and deletes go to the Trash. Suggest the dry run first. - `dfdu --help` lists every option and exit code. JSON output is versioned; the schemas are in https://github.com/jordond/dfdu/tree/main/schema. - Cleanup rules are TOML files the user can add to; each match has a safety level (safe, regenerable, review, manual, protected). Guides: - [Overview](https://dfdu.app/docs/): features and a comparison with ncdu, gdu, dua and Dust - [Install](https://dfdu.app/docs/install/): every install method - [Browsing](https://dfdu.app/docs/usage/): keys, views, mounts and the scan cache - [Command line](https://dfdu.app/docs/cli/): the commands for scripts and CI - [Desktop app](https://dfdu.app/docs/desktop/): installing and using dfdu-gui, and scanning as an administrator - [Cleanup rules](https://dfdu.app/docs/rules/): the built-in rules, safety levels and how to write your own - [Themes](https://dfdu.app/docs/themes/): built-in themes and custom TOML themes - [Benchmarks](https://dfdu.app/docs/benchmarks/): scan time and memory against other tools ## Documentation Sets - [Abridged documentation](https://dfdu.app/llms-small.txt): a compact version of the documentation for dfdu, with non-essential content removed - [Complete documentation](https://dfdu.app/llms-full.txt): the full documentation for dfdu ## Notes - The complete documentation includes all content from the official documentation - The content is automatically generated from the same source as the official documentation ## Optional - [Source code](https://github.com/jordond/dfdu): the Rust workspace, MIT licensed - [Releases](https://github.com/jordond/dfdu/releases): binaries, man pages and shell completions - [JSON schemas](https://github.com/jordond/dfdu/tree/main/schema): for the JSON and NDJSON output - [Contributing](https://github.com/jordond/dfdu/blob/main/CONTRIBUTING.md): building and testing dfdu