Show HN: Clearrr – effortlessly clear all heavy temp folders

4 months ago 2

🧹 Effortlessly clear heavy temp folders — safely, fast, and with full control.


clearrr is a simple but powerful CLI tool to find and remove large build and cache folders like node_modules, .venv, __pycache__, dist, build, .next — freeing gigabytes of disk space across all your projects.

It’s safe by default:

  • Dry-run by default: Nothing is deleted unless you confirm.
  • Presets for Node.js, Python, or all.
  • Runs anywhere with npx.

npx clearrr [dir] [--preset=node|python|php|rust|all] [--confirm]

  • 🗂️ Recursively finds temp folders under any path
  • 🔒 Dry-run by default — see what will be deleted & how much space you’ll free
    • ⚙️ Presets for Node, Python, PHP, and Rust projects, or all
  • ⚡️ Fast — powered by fast-glob
  • 🧩 Custom patterns — override with your own
  • 🧹 Safe — never touches .git, source files, or config folders

You can run with npx — no install needed.

Or install globally for daily use:


Dry-run example (default) Check what would be deleted for Node projects:

npx clearrr ./my-monorepo --preset=node

Actually delete (must confirm) Delete safely with --confirm:

npx clearrr ./my-monorepo --preset=node --confirm

Python project example:

npx clearrr ./my-data-scripts --preset=python --confirm

Custom patterns:

npx clearrr . --patterns="node_modules,dist,build,.cache" --confirm

Preset Folders deleted
node node_modules, .next, .nuxt, .turbo, .parcel-cache, .cache, dist, build
python venv, .venv, __pycache__, .mypy_cache, .pytest_cache, build, dist, .tox
php vendor
rust target
all (default) Everything in node + python + php + rust

  • Dry-run by default — nothing is deleted unless --confirm is set.
  • ✅ Does not touch .git, .vscode, .idea, or any source folders.
  • ✅ Reports total disk space to free up before deletion.

Option Description Default
[dir] Root folder to scan . (current)
--preset node, python, php, rust, or all all
--patterns Override preset with custom comma-list
--dry-run Explicit dry-run true
--confirm Actually delete matched folders false
--[no-]recursive Enable/disable recursive search true

🧹 clearrr preset: node 📂 Searching in: /Users/you/Developer 🧩 Patterns: node_modules,.next,.nuxt,.turbo,.parcel-cache,.cache,dist,build [dry-run] Would delete: /Users/you/Developer/project1/node_modules (242.3 MB) [dry-run] Would delete: /Users/you/Developer/project2/.next (58.1 MB) ✅ Would free approximately 300.4 MB. 💡 To confirm deletion, re-run with --confirm
Read Entire Article