# Install btdu with Homebrew, Nix

Sampling disk usage profiler for btrfs. Version 0.7.2 via Homebrew; verified 2026-07-03.

## Install

```sh
sudo av install brew:btdu
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install btdu
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#btdu
```

  Evidence: nixpkgs package indexes: pkgs/by-name/bt/btdu/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:btdu
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/btdu>
- **Version:** 0.7.2
- **Source summary:** Sampling disk usage profiler for btrfs
- **Homepage:** <https://github.com/CyberShadow/btdu>
- **Repository:** <https://github.com/CyberShadow/btdu>
- **Upstream docs:** <https://github.com/CyberShadow/btdu#readme>
- **License:** GPL-2.0-only
- **Source archive:** <https://github.com/CyberShadow/btdu/archive/refs/tags/v0.7.2.tar.gz>
- **Last updated:** 2026-07-03T15:25:04-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- btdu (cli)
- btdu (alias)

## Dependencies

- ncurses

## Build dependencies

- btrfs-progs
- dub
- ldc

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.7.2
- Package-manager updated: 2026-07-03
- Local data: ok
- Upstream repository: https://github.com/CyberShadow/btdu
- Upstream latest detected: v0.7.2 (current)
## Project history and usage

btdu is a sampling disk-usage profiler for btrfs. It exists because copy-on-write snapshots, reflinks, extent sharing, and compression make classic directory walkers like du and ncdu poor explanations of real btrfs space usage.

### Project history

CyberShadow started btdu in November 2020, with the first public release tag v0.1.0 shortly afterward. The project is written for the btrfs filesystem and uses sampling over filesystem space rather than a conventional recursive directory traversal.

The README explains that btdu samples random points in the disk space, asks btrfs what is stored there, records a representative path, and repeats indefinitely. The result is initially approximate but becomes progressively more accurate as sampling continues.

### Adoption history

btdu has a narrower audience than general disk analyzers, but the README documents several distribution paths: native distro packages where available, static binaries from GitHub releases, latest CI builds, Nix flakes, and source builds using the D compiler and Dub.

The Homebrew and Nix packaging in the input reflects that btrfs users often still want btdu available from cross-platform package managers even though its runtime target is btrfs rather than generic macOS storage.

### How it is used

Users run btdu with root privileges against the top-level subvolume of a btrfs filesystem. It can launch an interactive terminal UI, run headless for scripts, export and import sampling results, compare baselines, and use expert or physical-space modes for deeper analysis.

### Why package nerds care

btdu is significant because it packages filesystem theory into a small terminal tool. It is not another ncdu clone; it is a btrfs-specific answer to shared extents, compression, snapshots, unreachable extent fragments, and logical-versus-physical allocation.

### Timeline

- 2020: First git commit and v0.1.0 release.
- 2025: v0.6.0 release appears in git history.
- 2026: v0.7.2 release appears in git history.

### Related projects

- The README contrasts btdu with ncdu for classic disk-usage analysis.
- The README links compsize as a special-purpose btrfs compression-space tool.
- The README names btsdu, the Btrfs Snapshot Disk Usage Analyzer, in its See Also section.

### Sources

- Local git history from https://github.com/CyberShadow/btdu shows first commit in 2020 and release tags v0.1.0, v0.6.0, and v0.7.2.
- Official CONCEPTS.md explains logical versus physical space and btdu size metrics: https://raw.githubusercontent.com/CyberShadow/btdu/master/CONCEPTS.md
- Official README describes btdu as a sampling disk usage profiler for btrfs and explains the random sampling algorithm: https://raw.githubusercontent.com/CyberShadow/btdu/master/README.md
- Official README documents use cases, install paths, root/top-level-subvolume usage, headless mode, import/export, compare mode, and See Also: https://raw.githubusercontent.com/CyberShadow/btdu/master/README.md


## Security Notes

No matching local secret-handling manifest was found for btdu. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** btdu
- **Version Scheme:** 0
- **Revision:** 0
- **Requirements:** linux
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - btdu: normalized package name match | nixpkgs package indexes: pkgs/by-name/bt/btdu/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched curated package taxonomy and local package facts.
- [ncurses](https://www.automicvault.com/pkg/brew/ncurses/) - Runtime dependency declared by Homebrew.
- [btrfs-progs](https://www.automicvault.com/pkg/brew/btrfs-progs/) - Build dependency declared by Homebrew.
- [dub](https://www.automicvault.com/pkg/brew/dub/) - Build dependency declared by Homebrew.
- [ldc](https://www.automicvault.com/pkg/brew/ldc/) - Build dependency declared by Homebrew.
- [apachetop](https://www.automicvault.com/pkg/brew/apachetop/) - Local package facts share a topical domain. Shared terms: ncurses.
- [center-im](https://www.automicvault.com/pkg/brew/center-im/) - Local package facts share a topical domain. Shared terms: ncurses.
- [dump1090-fa](https://www.automicvault.com/pkg/brew/dump1090-fa/) - Local package facts share a topical domain. Shared terms: ncurses.

## Combined YAML source

View the package source record on GitHub. [combined/btdu.yml](https://github.com/automic-vault/db/blob/main/combined/btdu.yml)


## Sources

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
