Skip to main content

Reclaim disk space from build artifacts & dependency caches (node_modules, .venv, target, .next, __pycache__ …) across every language in one scan. Zero dependencies, no install.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diskreap-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diskreap-0.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file diskreap-0.1.0.tar.gz.

File metadata

  • Download URL: diskreap-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for diskreap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b2b1a2f7d54e52dbcfba7e2dd74749a89074bd6acd6ba0a12ff262923dff589b
MD5 6ca5d6f98c38a6328e585751f72861ae
BLAKE2b-256 be59345921da975d66fd188054794c99684ed0f73e497723165c0189302d570b

See more details on using hashes here.

File details

Details for the file diskreap-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: diskreap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for diskreap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3614ec2aea6e2474626c7d2342a241817f79dd0530a5d47e81f7f26af9b3d963
MD5 cec046d559dd95e841de0848d301518f
BLAKE2b-256 3bcf63ad6fcc3ae4058e0b38f296fbf200201661580b06d8513045a8bcbbb83d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page