diskreap
Reclaim disk space from build artifacts and dependency caches — across every
language, in one scan. node_modules, .venv, target, .next,
__pycache__, .gradle, dist/build, and more — diskreap finds them all,
shows you what's eating your disk, and deletes only what a single command can
rebuild. Zero dependencies, pure standard library.
# Run without installing:
pipx run diskreap # scan the current directory
# Or install it:
pip install diskreap
diskreap clean ~/code # reclaim (asks first)
Why
Every project you've ever touched left a node_modules or a target/ behind.
Across a ~/code folder with dozens of repos, that's easily tens of gigabytes
of stuff you never think about — until the disk fills up.
The existing tools each cover one corner: npkill is node_modules-only,
kondo needs a Rust toolchain. diskreap is one zero-dependency command
that reaches every ecosystem at once and refuses to touch anything that
isn't safely regenerable. (A byte-for-byte twin also ships on npm as
diskreap for npx users.)
What it reclaims
| Directory | Kind | Comes back via |
|---|---|---|
node_modules |
Node deps | npm install |
.venv · venv |
Python venv | python -m venv |
__pycache__ · .pytest_cache · .mypy_cache · .ruff_cache |
Python caches | auto |
.next · .nuxt · .svelte-kit · .turbo · .parcel-cache |
JS build/cache | rebuild |
target (beside Cargo.toml/pom.xml) |
Rust/Maven build | cargo/mvn build |
.gradle |
Gradle cache | gradle build |
vendor (beside composer.json/go.mod) |
PHP/Go deps | composer/go install |
dist · build (beside a project manifest) |
Build output | rebuild |
.terraform · Pods |
Terraform / CocoaPods | init / pod install |
Safety by design: generic names like target, dist, build, vendor
are only ever matched when a sibling project file proves their origin — a bare
build/ folder of your own files is never touched. Symlinks are never followed,
and clean always asks before deleting (unless you pass --yes).
Usage
diskreap [path] # scan (default: current dir)
diskreap scan ~/code # explicit scan
diskreap clean ~/code # delete (confirms first)
Scan
diskreap scan ~/code
#
# /Users/you/code
#
# 412 MB Node deps webapp/node_modules · 3w ago
# 1.2 GB Rust/Maven build scanner/target · 5d ago
# 88 MB Python venv ml-notes/.venv · 2mo ago
# ────────────────────────────────────────────────────
# total reclaimable: 1.7 GB across 12 dir(s)
Filters
diskreap scan ~/code --min 100MB # ignore the small fry
diskreap scan ~/code --older 30d # only stuff untouched for a month
diskreap scan ~/code --only node_modules,target
diskreap scan ~/code --json # machine-readable
Clean
diskreap clean ~/code --dry-run # preview exactly what would go
diskreap clean ~/code --older 60d # reap only long-idle projects
diskreap clean ~/code --yes # no prompt (scripts / CI)
clean accepts the same --min / --older / --only filters as scan.
Exit codes
| Code | Meaning |
|---|---|
0 |
ok (scan complete, or clean finished) |
2 |
error (bad args, or a deletion failed) |
Size & duration formats
Sizes: 500K · 10MB · 1.5G (binary units). Durations: 12h · 30d ·
2w (a bare number means days).
License
MIT
Metadata
Release files for diskreap 0.1.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 | |
|---|---|---|---|
| diskreap-0.1.0.tar.gz | 13.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diskreap-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.7 kB
Release files / diskreap-0.1.0.tar.gz
| Download URL | diskreap-0.1.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2b1a2f7d54e52dbcfba7e2dd74749a89074bd6acd6ba0a12ff262923dff589b
|
|
BLAKE2b-256 checksum How to use checksums |
be59345921da975d66fd188054794c99684ed0f73e497723165c0189302d570b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|
Release files / diskreap-0.1.0-py3-none-any.whl
| Download URL | diskreap-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3614ec2aea6e2474626c7d2342a241817f79dd0530a5d47e81f7f26af9b3d963
|
|
BLAKE2b-256 checksum How to use checksums |
3bcf63ad6fcc3ae4058e0b38f296fbf200201661580b06d8513045a8bcbbb83d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|