🧹 diskuse
A fast, read-only disk usage browser for macOS and Linux,
inspired by OmniDiskSweeper
⚡️ Quickstart
-
Run diskuse without installing it using
uvx diskuse -
Or browse a specific folder with
uvx diskuse ~ -
Press
?to see all the keys
To install it instead, use uv tool install diskuse, pipx install diskuse or cargo install diskuse.
Prebuilt binaries for macOS and Linux are also on the releases page.
📋 Features
- As fast as dua and dumac, and faster than dust, pdu, gdu and ncdu (see benchmarks)
- Read-only, it never deletes anything. Reveal an item in Finder with
rand delete it yourself - Three columns like OmniDiskSweeper, with sizes filling in while it scans, and how far a whole-disk scan has got
- Updates live while open, with a column showing what grew or shrank
- Labels for caches and other large folders, eg.
node_modules,target,.venv, Xcode, Docker - Pick items with
spaceto come back to later - Works on macOS and Linux
⌨️ Keys
| Key | Action | Key | Action |
|---|---|---|---|
arrows, hjkl |
move | space |
pick an item |
r |
reveal in Finder | p |
list picked items |
o |
open | c |
sort by change |
/ |
filter | s / S |
rescan folder / everything |
t |
largest files | d |
folders that could not be read |
i |
everything about the selected item | u |
sizes in GiB or GB |
? |
help | q |
quit |
💻 Command Line
diskuse scan ~/src # print sizes, largest first
diskuse scan ~/src --top 10 # also list the 10 largest files
diskuse scan ~/src --json # json output for scripts
diskuse show ~/src # print the last scan again
diskuse scan ~/src --si # sizes in kB, MB, GB (powers of 1000)
DISKUSE_LOG=/tmp/du.log diskuse ~ # a debug log: scans, and changes the OS missed
Sizes are allocated bytes like du -x. Scans stay on one disk, never follow symlinks, and count hard links once.
🦀 Rust
The scanner is a library too (cargo add diskuse-core). Folders are ids of one tree, and the root is 0:
use diskuse_core::{Event, FolderId, LiveOptions, ReadTree, ScanOptions};
let tree = diskuse_core::scan(path, &ScanOptions::default())?;
for k in tree.children(FolderId::ROOT) {
println!("{} {}", tree.size(k), tree.path(k).display()); // allocated bytes, like du
}
tree.find(Path::new("a/b")); // Some(id), good for this tree only
tree.save(Path::new("src.scan"))?; // and Tree::load: the only file it writes, and only when asked
tree.largest_files(10); // [(path, bytes), ...]
tree.files(FolderId::ROOT, false)?; // the root's files, listed from disk now
// a thread of its own scans and follows; events come to a handler,
// here a channel
let (tx, events) = std::sync::mpsc::channel();
let live = diskuse_core::live(path, LiveOptions::default(), tx);
for event in events {
match event? {
Event::Ready(tree) => {} // the scan finished
Event::Changed(tree, changes) => {} // [(path, delta_bytes), ...]
Event::Missed(reason, path) => live.rescan(FolderId::ROOT), // the OS missed changes: your call
_ => {}
}
}
🐍 Python
The same API from Python (pip install diskuse):
import diskuse
tree = diskuse.scan("~/src")
for k in tree.children(0):
print(tree.size(k), tree.path(k)) # allocated bytes, like du
tree.find("a/b") # id or None
tree.largest_files(10) # [(path, bytes), ...]
tree.files(0) # the root's files, listed from disk now
tree.label(k) # Label(tier=Tier.Cache, text="cache: npm", why="npm install rebuilds it") or None
pyarrow.table(tree) # every folder as a row, also polars and duckdb
tree.save("src.scan") # the only file it writes, and only when asked
tree = diskuse.load("src.scan")
diskuse.mounts() # [Mount(point="/", fs="apfs", hidden=False, total=..., used=..., free=...), ...]
with diskuse.live("~/src") as live:
for event in live: # or: async for
match event:
case diskuse.Event.Ready(tree):
... # the scan finished
case diskuse.Event.Changed(tree, changes):
... # [(path, delta_bytes), ...]
case diskuse.Event.Missed(reason, path):
live.rescan(0) # the OS missed changes: your call
See crates/diskuse-python/examples/tui.py for a small browser written in Python with this API.
🔐 Full Disk Access (macOS)
macOS hides some folders like Mail, Messages and Safari from apps without Full Disk Access.
diskuse checks this before your first scan and tells you which terminal app needs it.
To enable it, turn on your terminal in System Settings > Privacy & Security > Full Disk Access, then restart the terminal.
diskuse never asks for sudo.
🏁 Benchmarks
Warm cache on an Apple M4 (10 cores, 24 GB, macOS 27), 3 timed runs each, so differences under about 6% are noise.
Every tool's total matched du. See bench/README.md to reproduce.
S1: the dumac README tree, 4,095 folders and 409,500 files
| tool | kind | time | memory |
|---|---|---|---|
| diskuse | tree | 0.342 s | 7.7 MiB |
| dua | tree | 0.350 s | 9.2 MiB |
| dumac | totals only | 0.446 s | - |
Homebrew: a homebrew prefix, 42,700 folders and 12 GiB. "Best" is each tool at its fastest thread count.
| tool | kind | default threads | best | memory |
|---|---|---|---|---|
| diskuse | tree | 0.610 s | 0.610 s | 13.8 MiB |
| dumac | totals only | 0.636 s | 0.636 s | 31.8 MiB |
| dua | tree | 0.722 s | 0.647 s | 12.7 MiB |
| diskus | totals only | 0.997 s | 0.950 s | 20.2 MiB |
| dust | tree | 1.086 s | 1.086 s | 156.7 MiB |
| pdu | tree | 1.087 s | 0.989 s | 36.5 MiB |
| gdu | tree | 1.844 s | 1.177 s | 41.9 MiB |
| ncdu | totals only (-o -) |
2.709 s | 1.030 s | 2.3 MiB |
| du | totals only | 2.703 s | 2.703 s | 5.5 MiB |
| DiskScour | tree | 3.581 s | 3.581 s | 248.8 MiB |
Versions: dua 2.45.1, gdu 5.37.0, dust 1.2.6, pdu 0.24.0, ncdu 2.9.2, DiskScour 0.5.0, diskus 0.9.0, dumac 1ffbe3c3, du (macOS).
🛠 Development
Run just check to format, lint and test, and just demo to re-record the demo above. Benchmarks are run with just bench, see bench/README.md.
Scans are cached in ~/Library/Caches/diskuse (or ~/.cache/diskuse on Linux), which can be changed with DISKUSE_CACHE_DIR.
This is the only place the diskuse command ever writes to. The library also writes the one file Tree::save (tree.save in Python) is given.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
🤖 AI Use
diskuse was written with the help of an AI coding assistant (Claude Code). I designed the features, made the decisions, and reviewed and tested every change. The benchmarks are real runs on real machines, see bench/README.md.
Metadata
Release files for diskuse 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| diskuse-0.2.0.tar.gz | 190.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| diskuse-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| diskuse-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| diskuse-0.2.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| diskuse-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 4.9 MB
Release files / diskuse-0.2.0.tar.gz
| Download URL | diskuse-0.2.0.tar.gz |
|---|---|
| Size | 190.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba61cc30a5906846befa2741672c9b960506d7ac08e30b284573f73504a9665d
|
|
BLAKE2b-256 checksum How to use checksums |
5c211bb82783b8dfcdc227312618289396efe1d0ab9fb569367263d079e5e78b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / diskuse-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | diskuse-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
04f2451b98eefc6863dcc69829eb7d76ac3a3ef30c17e1b05ba12449347ead9e
|
|
BLAKE2b-256 checksum How to use checksums |
7c6057db0714a1277f3815d904d20f7d122aef72942f4ee8690d461afe914914
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / diskuse-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | diskuse-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
9d0f241678f30b32db55579b8e0926f685d0d25c428269094af1abc39396b756
|
|
BLAKE2b-256 checksum How to use checksums |
72528ae05027ad24e1406077dd4c350e31a93c4a0a1b4b1b530e052e25f7f1f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / diskuse-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | diskuse-0.2.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
03b62ba9f84e59344942f2e895c29409cf8e6d5c012bcfa159fdd6bc3a91b627
|
|
BLAKE2b-256 checksum How to use checksums |
a9d9256f1ba79ce91e2f1071455f4c79f5cf807cdcd950e104668ef93c322fe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / diskuse-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | diskuse-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
edd14784c82cad6c30b0c537ec4ea726e273946dfd92e7195d146354f9fc10de
|
|
BLAKE2b-256 checksum How to use checksums |
dabe078b077ee044379092cb198880542007e82084fe60cbb066c80f7262cac3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency log