Skip to content

EfeHasNoLuck/diskbroom

Repository files navigation

diskbroom

Find and reclaim the gigabytes of regenerable build junk rotting across all your projects — safely, on any OS.

npm license node

Every developer's disk is quietly bleeding space to node_modules, .venv, target/, .gradle, and a dozen build caches — all of it perfectly regenerable with a single command. diskbroom walks your projects, adds it all up, and shows you exactly where the space went.

diskbroom scanning ~/code and reporting 3.6 GB of reclaimable build artifacts across JavaScript, Rust, Python and Gradle projects

Why another cleaner?

Most tools only know about node_modules and lean Unix-only. diskbroom is:

  • Cross-ecosystem — JavaScript, Python, Rust, Java/Gradle, .NET, Terraform, and more in one pass.
  • First-class on Windows — built and tested on Windows, macOS, and Linux.
  • Safe by design — never follows symlinks, never descends into system folders, and (for now) never deletes anything. It only reports.
  • Precise — ambiguous names like target/, dist/, and bin/ are only flagged when a real project marker (e.g. Cargo.toml, package.json, a .csproj) sits next to them, so your hand-written build/ folder is left alone.
  • Zero runtime dependencies — small, fast, and nothing sketchy in your node_modules (ironic, we know).

Install

Run it once without installing:

npx diskbroom

Or install globally:

npm install -g diskbroom

Usage

diskbroom [path] [options]
Option Description
path Directory to scan (default: current directory)
--top <n> Show only the n largest findings
--depth <n> Limit how deep to descend
--json Output machine-readable JSON
-h, --help Show help
-v, --version Show version

Examples

diskbroom                     # scan the current folder
diskbroom ~/code --top 20     # 20 biggest artifacts under ~/code
diskbroom . --json            # JSON output for scripts or CI

What it detects

Ecosystem Folders
JavaScript node_modules, .next, .nuxt, .svelte-kit, .turbo, .parcel-cache, .angular, coverage
Python .venv, venv, __pycache__, .mypy_cache, .pytest_cache, .ruff_cache, .tox
Rust target (next to a Cargo.toml)
Java / Gradle .gradle
.NET bin, obj (next to a project/solution file)
Build output dist, build (next to a project manifest)
Terraform .terraform

Missing something? Open an issue — the catalogue is easy to extend in src/patterns.ts.

Confidence levels

  • high — the folder is unambiguous and always regenerable. Counted in the headline total.
  • medium — the folder name could theoretically hold source, so diskbroom only flags it when a project marker is present, and reports it separately for you to review.

Roadmap

  • Interactive mode — select folders and delete them (dry-run by default, with confirmation)
  • --older-than 30d to target only stale artifacts
  • Config file for custom rules and ignore paths
  • Package-manager cache cleanup (npm, pip, cargo, Gradle global caches)

Contributing

Issues and PRs are very welcome — especially new ecosystem rules. See src/patterns.ts for how detection works.

git clone https://github.com/EfeHasNoLuck/diskbroom
cd diskbroom
npm install
npm test
npm run build
node dist/cli.js --help

License

MIT © Efe Saygılı

About

Find and reclaim gigabytes of regenerable build junk (node_modules, .venv, target, caches…) across all your projects — safely, on any OS.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages