parallel-disk-usage is a free, open source system cleanup & optimization project written in Rust and released under Apache-2.0. It has 731 GitHub stars, 25 forks and 21 open issues, and was last pushed 7 days ago. On this registry it ranks #16 of 19 tracked projects in System Cleanup & Optimization, with 5 head-to-head comparisons available.

What is parallel-disk-usage?

parallel-disk-usage (pdu) is a highly parallelized directory tree analyzer written in Rust that renders a graphical chart of file and directory sizes directly in the terminal, and it is aimed at developers and system administrators who need to find out where disk space has gone without leaving the command line.

What it is

pdu is a CLI program distributed through the Rust ecosystem as the parallel-disk-usage crate, which ships both a binary crate and a library crate. It walks a directory tree, measures the size of the files and directories it finds, and renders the result as a graphical chart rather than as a plain list of byte counts. The terminal output is supplemented by a JSON interface and by shell completion files generated through generate-completions.sh.

The concrete problem it solves is answering the question of what is consuming space on a filesystem, quickly, from a shell. The README presents it explicitly as an alternative to dust and dutree, and the project benchmarks itself against du, dua, ncdu and gdu. Where sequential tools spend their time walking large trees one entry at a time, pdu parallelizes the traversal, then replaces the flat output of a du-style listing with a proportional chart in which relative sizes are visible at a glance.

Key capabilities

  • Renders a graphical chart of disk usage for files and directories in the terminal, with a customizable chart size and a customizable tree depth.
  • Supports relative comparison of separate files, so sizes can be read proportionally rather than as isolated byte counts.
  • Extends through the parallel-disk-usage library crate or through a JSON interface, allowing the measurement to be consumed by other programs.
  • Handles hardlinks without bias by default, treating all hardlinks as equally real, with optional hardlink detection and deduplication that makes pdu proportionally slower.
  • Offers an optional progress report for long scans, which makes pdu slightly slower.
  • Is published on crates.io as parallel-disk-usage, so it can be installed and updated through the standard Cargo workflow.

Who uses it and how

  • Developers and system administrators on Unix-like systems who need to locate large directories on a mounted filesystem without a GUI.
  • Users who want the sizes of separate files and directories compared side by side in one chart instead of running several du invocations.
  • Teams that need disk usage data in a machine-readable form, using the JSON interface rather than parsing a rendered chart.
  • Environments where hardlink duplication matters, such as backup or snapshot directories, where the default unbiased treatment avoids under-counting links and deduplication can be enabled when a slower, deduplicated figure is preferred.
  • Readers assessing performance against dust, dua, ncdu, gdu and du, for which the project publishes benchmark charts produced by a GitHub Actions workflow and uploaded to its release page.

Getting started

Install the parallel-disk-usage crate from crates.io, or build from source with cargo build --bin pdu --release, which produces the executable at target/release/pdu. A ./run pdu "${arguments[@]}" helper is provided for running the binary during development.

How it compares

The README positions pdu as an alternative to dust and dutree, and its benchmark compares pdu v0.20.0 against dust, dua, ncdu, gdu and the classic du, with lower results being better. Unlike the interactive browsers among those tools, pdu emphasizes a rendered chart plus relative comparison of separate files, and unlike plain du it can emit JSON for downstream processing.

When to use it — and when not to

Anyone adopting pdu accepts its documented limitations: it is ignorant of reflinks on copy-on-write filesystems such as BTRFS and ZFS, and it does not follow symbolic links. The runtime is optimized at the expense of binary size, and the README defers the full help text to USAGE.md, so the front page is not a complete reference on its own. It is a poor fit for anyone who needs a browsable, interactive disk explorer or a graphical desktop application.

project readme (upstream, from github) — read inline

Parallel Disk Usage (pdu)

Test Benchmark Clippy Code formatting Crates.io Version

Highly parallelized, blazing fast directory tree analyzer.

Description

pdu is a CLI program that renders a graphical chart for disk usages of files and directories, it is an alternative to dust and dutree.

Benchmark

The benchmark was generated by a GitHub Workflow and uploaded to the release page.

Programs
benchmark results

(lower is better)

(See more)

Demo

screenshot

asciicast of pdu command

asciicast of pdu command on /usr

Features

  • Very fast.
  • Relative comparison of separate files.
  • Extensible via the library crate or JSON interface.
  • Unbiased regarding hardlinks: All hardlinks are treated as equally real.
  • Optional hardlink detection and deduplication (would make pdu proportionally slower).
  • Optional progress report (would make pdu slightly slower).
  • Customize tree depth.
  • Customize chart size.

Limitations

  • Ignorant of reflinks (from COW filesystems such as BTRFS and ZFS).
  • Does not follow symbolic links.
  • The runtime is optimized at the expense of binary size.

Usage

See USAGE.md for the full help text.

Development

Prerequisites

Test

./test.sh && ./test.sh --release
Environment Variables
name type default value description
FMT true or false true Whether to run cargo fmt
LINT true or false true Whether to run cargo clippy
DOC true or false false Whether to run cargo doc
BUILD true or false true Whether to run cargo build
TEST true or false true Whether to run cargo test
BUILD_FLAGS string (empty) Space-separated list of flags for cargo build
TEST_FLAGS string (empty) Space-separated list of flags for cargo test
TEST_SKIP string (empty) Space-separated list of test names to skip

Run

./run pdu "${arguments[@]}"
  • "${arguments[@]}": List of arguments to pass to pdu.

Build

Debug build
cargo build --bin pdu

The resulting executable is located at target/debug/pdu.

Release build
cargo build --bin pdu --release

The resulting executable is located at target/release/pdu.

Update shell completion files

./generate-completions.sh

Extending parallel-disk-usage

The parallel-disk-usage crate is both a binary crate and a library crate. If you desire features that pdu itself lacks (that is, after you have asked the maintainer(s) of pdu for the features but they refused), you may use the library crate to build a tool of your own. The documentation for the library crate can be found in docs.rs.

Alternatively, the pdu command provides --json-input flag and --json-output flag. The --json-output flag converts disk usage data into JSON and the --json-input flag turns said JSON into visualization. These 2 flags allow integration with other CLI tools (via pipe, as per the UNIX philosophy).

Beware that the structure of the JSON tree differs depending on the number of file/directory names that were provided (as CLI arguments):

  • If there are only 0 or 1 file/directory names, the name of the tree root would be a real path (either . or the provided name).
  • If there are 2 or more file/directory names, the name of the tree root would be (total) (which is not a real path), and the provided names would correspond to the children of the tree root.

Installation

Any Desktop OS

From GitHub

Go to the GitHub Release Page and download a binary.

[!NOTE] Starting with version 0.23.0, every executable published to GitHub Releases ships with a build provenance attestation, so you can cryptographically verify that the binary was produced by this repository's deployment workflow rather than uploaded by hand. See How can I trust the release binaries? for the verification command.

From crates.io

Prerequisites:

cargo install parallel-disk-usage --bin pdu

Arch Linux

From the Official Repository
sudo pacman -S parallel-disk-usage

Distributions

Packaging Status

Frequently Asked Questions

Is this project vibe-coded?

No. "Vibe coding" means letting AI do everything without human involvement. This project uses AI-assisted workflows with active human direction and reviews.

Using AI also does not mean poor quality. On the contrary, AI reviews have helped detect previously undetected bugs.

How can I trust the release binaries?

Starting with version 0.23.0, every executable published to GitHub Releases is accompanied by a build provenance attestation. The attestation is cryptographically signed by Sigstore and records that the binary was built by this repository's GitHub Actions deployment workflow from a specific commit. Sigstore is a public-good signing service operated by the Linux Foundation. The signing happens inside GitHub's infrastructure via OIDC, and the signatures are logged to Sigstore's public transparency log. The guarantee therefore does not depend on trusting the maintainer's personal word. Any tampered or manually uploaded binary would fail verification.

To verify a downloaded binary, install the GitHub CLI and run:

gh attestation verify downloaded-pdu --repo KSXGitHub/parallel-disk-usage
# note: replace `downloaded-pdu` with the filename you downloaded.

A successful run prints the signer workflow and confirms that the file's SHA-256 matches the attested digest. All attestations for this repository can also be browsed at the Attestations page.

Binaries from releases older than 0.23.0 are not attested.

Similar programs

License

Apache 2.0 © Hoàng Văn Khải.

Frequently asked questions

Is parallel-disk-usage free to use?

parallel-disk-usage is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does parallel-disk-usage do?

Highly parallelized, blazing fast directory tree analyzer

What is parallel-disk-usage written in?

parallel-disk-usage is primarily written in Rust. Its source is publicly available at https://github.com/KSXGitHub/parallel-disk-usage, and it has 731 GitHub stars.