Pumu (Package Manager Utility) is a fast, concurrent disk space management tool for developers. It helps you find and remove heavy dependency folders across multiple projects and package managers, then optionally reinstall them.
Stop manually hunting down node_modules folders eating up gigabytes of disk space. Pumu does it for you, intelligently.
- π Multi-language support - Works with npm, pnpm, yarn, bun, deno, cargo, go, and pip
- β‘ Blazingly fast - Concurrent scanning and deletion using goroutines with semaphore-based throttling
- π Visual feedback - Color-coded output based on folder size with human-readable formatting
- π― Smart detection - Automatically identifies package managers via lockfiles and manifests
- π Reinstall option - Optionally reinstall dependencies after cleanup
- π‘οΈ Safe defaults - Ignores system folders and version control directories
- π Dry-run mode - Preview what will be deleted before taking action
- β Interactive selection - Choose which folders to delete/reinstall via TUI multi-select
- π§ Repair mode - Detect and fix corrupted dependencies automatically
- πΏ Smart prune - Score-based intelligent cleanup that only removes what's safe
Pumu can detect and clean these dependency/build folders:
| Folder | Package Manager(s) | Typical Size |
|---|---|---|
node_modules |
npm, yarn, pnpm, bun, deno | 50-500+ MB |
target |
cargo (Rust) | 100-2000+ MB |
.venv |
pip (Python virtual env) | 50-300+ MB |
.next |
Next.js | 100-500+ MB |
.svelte-kit |
SvelteKit | 50-200+ MB |
dist |
Various build tools | 10-100+ MB |
build |
Various build tools | 10-100+ MB |
brew install carlosedujs/pumu/pumugit clone https://github.com/carlosedujs/pumu.git
cd pumu
go build -o pumu
sudo mv pumu /usr/local/bin/go install github.com/carlosedujs/pumu@latestpumu [command] --helppumu scans your filesystem for heavy dependency folders
(node_modules, target, .venv, etc.) and lets you sweep, list,
repair or prune them with ease.
Usage:
pumu [flags]
pumu [command]
Available Commands:
list List heavy dependency folders (dry-run)
sweep Sweep (delete) heavy dependency folders
repair Repair dependency folders
prune Prune dependency folders by staleness score
completion Generate the autocompletion script for the specified shell
help Help about any command
Flags:
-h, --help help for pumu
-p, --path string Root path to scan (default ".")
-v, --version version for pumu
Detects the package manager in the current directory, removes its dependency folder, and reinstalls:
pumuExample Output:
Running refresh in current directory...
π Detected package manager: npm
ποΈ Removing node_modules...
β
Removed in 1.23s
π¦ Running npm install...
[npm install output...]
π Refresh complete!
Display the current version of Pumu:
pumu --version
# or
pumu -vExample Output:
pumu version v1.2.1-rc.1
Recursively scans for heavy folders without deleting them. You can specify a path using the global -p or --path flag:
pumu list # scan current directory
pumu list --path ~/projects # scan a specific directoryExample Output:
π Listing heavy dependency folders in '.'... β±οΈ Found 3 folders. Calculating sizes concurrently... Folder Path | Size /home/user/projects/webapp/node_modules | 1.23 GB π¨ /home/user/projects/rust-app/target | 487.50 MB β οΈ /home/user/projects/api/.venv | 89.32 MB ---------------------------------------------------------------------------------------------------- π List complete! Found 3 heavy folders. πΎ Total space that can be freed: 1.79 GB
Recursively scans and deletes heavy folders. Shows an interactive multi-select by default so you can choose which folders to delete:
pumu sweep
pumu sweep -p ~/devExample Output:
π Scanning for heavy dependency folders in '.'... β±οΈ Found 3 folders. Calculating sizes concurrently... ποΈ Select folders to delete: βΈ [β] /home/user/projects/webapp/node_modules 1.23 GB [β] /home/user/projects/rust-app/target 487.50 MB [ ] /home/user/projects/api/.venv 89.32 MB 2/3 selected press ? for help
| Key | Action |
|---|---|
β / k |
Move cursor up |
β / j |
Move cursor down |
g / G |
Go to first / last |
space |
Toggle item |
a |
Select all |
n |
Deselect all |
i |
Invert selection |
enter |
Confirm |
q / esc |
Cancel |
? |
Toggle help |
Delete folders and choose which projects to reinstall:
pumu sweep --reinstallSkip the multi-select and delete all found folders directly (old behavior):
pumu sweep --no-select
pumu sweep --reinstall --no-selectScans for projects with corrupted or broken dependencies and automatically fixes them by removing and reinstalling:
pumu repairExample Output:
π§ Scanning for projects with broken dependencies in '.'... β±οΈ Found 3 projects. Checking health... π ./webapp (npm) β Missing: react, react-dom ποΈ Removing node_modules... π¦ Reinstalling... β Repaired! π ./api (pnpm) β Healthy, skipping. π ./rust-cli (cargo) β Compilation errors detected ποΈ Removing target... π¦ Rebuilding... β Repaired! ----- π§ Repair complete! Fixed 2/3 projects.
Show details for all projects, including healthy ones:
pumu repair --verbose| Ecosystem | Check Method |
|---|---|
| npm / pnpm | npm ls --json / pnpm ls --json |
| yarn | yarn check --verify-tree |
| cargo | cargo check |
| go | go mod verify |
| pip | pip check |
Smart cleanup β analyzes folders with a safety score (0-100) and only deletes what's truly safe. Less destructive than sweep:
pumu pruneExample Output:
πΏ Pruning safely deletable folders in '.'... β±οΈ Found 5 folders. Analyzing... Folder Path | Size | Score | Reason ./old-project/node_modules | 456.78 MB | 95 | π΄ No lockfile (orphan) ./webapp/.next | 234.56 MB | 90 | π’ Build cache (re-generable) ./api/node_modules | 189.00 MB | 60 | π‘ Lockfile stale (45 days) ./active-project/node_modules | 567.89 MB | 20 | βͺ Active project (skipped) ./wip/target | 890.12 MB | 15 | βͺ Uncommitted changes (skipped) ---------------------------------------------- πΏ Prune complete! Removed 3 folders (score β₯ 50). πΎ Space freed: 880.34 MB (of 2.34 GB total found)
| Score | Reason |
|---|---|
| 90-95 | Orphan folder (no lockfile) or build cache |
| 60-80 | Stale lockfile (30-90+ days without changes) |
| 45 | Dependency folder with lockfile (moderate) |
| 15-20 | Active project or uncommitted lockfile changes |
pumu prune --dry-run # Only analyze, don't delete
pumu prune --threshold 80 # Only prune folders with score β₯ 80Pumu automatically detects the package manager by checking for specific files in priority order:
- Bun -
bun.lockborbun.lock - pnpm -
pnpm-lock.yaml - Yarn -
yarn.lock - npm -
package-lock.json - Deno -
deno.jsonordeno.jsonc - Cargo -
Cargo.toml - Go -
go.mod - Pip -
requirements.txtorpyproject.toml
- Concurrent size calculation - Uses goroutines with a bounded semaphore (max 20 concurrent operations) to calculate folder sizes in parallel
- Concurrent deletion - Deletes multiple folders simultaneously while respecting system limits
- Smart path skipping - Automatically skips
.git,.cache, IDE folders, and other non-project directories - Atomic operations - Thread-safe accumulation of deleted space using atomic operations
To avoid scanning irrelevant directories, Pumu skips:
.Trash.cache,.npm,.yarn,.cargo,.rustupLibrary,AppData,Local,Roaming.vscode,.idea.git(version control)
pumu/
βββ main.go # CLI entry point
βββ cmd/ # CLI commands (Cobra)
β βββ root.go # Root command and global flags
β βββ sweep.go # Sweep command definition
β βββ list.go # List command definition
β βββ repair.go # Repair command definition
β βββ prune.go # Prune command definition
βββ internal/
β βββ scanner/
β β βββ scanner.go # Core scanning and deletion logic
β β βββ scanner_test.go # Scanner tests
β β βββ repair.go # Repair command logic
β β βββ prune.go # Prune command logic
β βββ pkg/
β β βββ detector.go # Package manager detection
β β βββ detector_test.go # Detector tests
β β βββ installer.go # Dependency installation
β β βββ cleaner.go # Directory removal utilities
β β βββ checker.go # Health checks per package manager
β β βββ analyzer.go # Prune scoring heuristics
β βββ ui/
β βββ multiselect.go # Interactive TUI multi-select component
βββ go.mod
βββ go.sum
βββ LICENSE
βββ README.md
- Go 1.24.0+ for building from source
- Package managers must be installed if using
--reinstallorrepair:- Node.js: npm, yarn, pnpm, or bun
- Rust: cargo
- Python: pip
- Go: go
- Deno: deno
Pumu uses visual indicators to help you prioritize cleanup:
- Red (π¨) - Folders larger than 1 GB (critical space users)
- Yellow (
β οΈ ) - Folders between 100 MB and 1 GB (moderate space users) - Green - Folders smaller than 100 MB (minor space users)
- Dry-run by default with
listcommand - preview before deletion - Interactive selection - choose exactly what to delete via TUI multi-select
- Smart prune - score-based cleanup that skips active projects
- Repair before delete - fix corrupted deps instead of blindly removing
- Explicit sweep - requires
sweepcommand to actually delete - Smart folder detection - only removes known dependency folders
- Concurrent safe - uses mutexes and atomic operations to prevent race conditions
- Error handling - continues processing even if individual operations fail
Free up disk space across all your projects:
cd ~/projects
pumu sweepSee what's taking up space without deleting:
cd ~/workspace
pumu listClean multiple projects and reinstall everything:
cd ~/dev
pumu sweep --reinstallRepair corrupted dependencies across all projects:
cd ~/projects
pumu repairIntelligently prune only stale and orphan folders:
cd ~/projects
pumu prune --dry-run # preview first
pumu prune # prune score β₯ 50
pumu prune --threshold 80 # conservative modeContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Carlos
Built with β€οΈ and Go