Skip to main content
Explore practical use cases showing how Pumu helps developers reclaim disk space, fix broken dependencies, and maintain clean development environments.

Clean Up Development Machine

Problem: Your development machine is running low on disk space with hundreds of node_modules, target, and other dependency folders scattered across projects. Solution: Use pumu sweep to scan and interactively clean up all heavy dependency folders across your projects.
cd ~/projects
pumu sweep
Expected 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
Tips:
  • Use the interactive selection to review each folder before deletion
  • Deselect active projects you’re currently working on
  • Press a to select all or i to invert selection
  • This can free up several gigabytes in seconds

Preview Disk Usage Before Deleting

Problem: You want to see what’s taking up space across your workspace without accidentally deleting anything. Solution: Use pumu list to perform a dry-run scan that shows all heavy folders and total space that can be freed.
cd ~/workspace
pumu list
Expected 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
Tips:
  • Use --path flag to scan a specific directory: pumu list --path ~/dev
  • Red folders (🚨) are over 1 GB - prioritize these for cleanup
  • Yellow folders (⚠️) are 100 MB - 1 GB - moderate space users
  • This is completely safe - nothing is deleted in list mode

Bulk Cleanup with Reinstall

Problem: You need to clean up multiple projects but want to ensure dependencies are reinstalled so the projects remain functional. Solution: Use pumu sweep --reinstall to delete heavy folders and then choose which projects to reinstall.
cd ~/dev
pumu sweep --reinstall
After selecting folders to delete, you’ll see a second interactive prompt:
Select projects to reinstall dependencies:
β–Έ [βœ“] /home/user/dev/webapp (npm)
  [βœ“] /home/user/dev/api (pnpm)
  [ ] /home/user/dev/old-project (npm)

  2/3 selected
Expected Output (during reinstall):
πŸ“¦ Reinstalling dependencies for 2 projects...

πŸ“ /home/user/dev/webapp (npm)
   Running: npm install
   βœ… Installed successfully

πŸ“ /home/user/dev/api (pnpm)
   Running: pnpm install
   βœ… Installed successfully

πŸŽ‰ Reinstall complete! 2/2 succeeded.
Tips:
  • Don’t reinstall old or archived projects you’re not using
  • Pumu automatically detects the correct package manager for each project
  • Use --no-select flag to skip interactive prompts: pumu sweep --reinstall --no-select

Fix Broken Dependencies Across Projects

Problem: Several projects have corrupted or incomplete dependencies causing build failures or missing packages. Solution: Use pumu repair to automatically detect and fix broken dependencies across all projects.
cd ~/projects
pumu repair
Expected 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.
Tips:
  • Repair mode runs health checks before taking any action
  • Use --verbose to see details for all projects including healthy ones
  • Health checks are ecosystem-specific: npm ls for npm, cargo check for Rust, etc.
  • Only projects with detected issues are repaired - healthy projects are left untouched

Safe Cleanup (Prune Mode)

Problem: You want to clean up disk space but are worried about accidentally deleting dependencies from active projects. Solution: Use pumu prune for intelligent, score-based cleanup that only removes folders that are safe to delete.
cd ~/projects
pumu prune
Expected 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)
Prune Scoring System:
ScoreReasonSafety Level
90-95Orphan folder (no lockfile) or build cacheVery Safe
60-80Stale lockfile (30-90+ days)Safe
45Dependency folder with lockfileModerate
15-20Active project or uncommitted changesProtected
Tips:
  • Preview first with --dry-run: pumu prune --dry-run
  • Increase safety with higher threshold: pumu prune --threshold 80
  • Prune mode is less destructive than sweep - perfect for regular maintenance
  • Folders with uncommitted changes are automatically protected

CI/CD Cleanup Scenarios

Problem: Your CI/CD pipeline needs to clean up dependency folders before rebuilding to ensure a fresh build environment. Solution: Use pumu sweep --no-select in CI scripts to skip interactive prompts and delete all found folders.
# In your CI/CD script
cd /app
pumu sweep --no-select
Alternative: Use default mode to refresh the current directory:
# Detects package manager and reinstalls
cd /app
pumu
Expected Output (default mode):
Running refresh in current directory...
πŸ” Detected package manager: npm
πŸ—‘οΈ  Removing node_modules...
βœ… Removed in 1.23s
πŸ“¦ Running npm install...
[npm install output...]
πŸŽ‰ Refresh complete!
Tips for CI/CD:
  • Use --no-select flag to avoid hanging on interactive prompts
  • Default mode (pumu) is perfect for single-directory refreshes
  • Consider using pumu repair before builds to catch dependency issues early
  • Combine with --path to target specific directories

Working with Monorepos

Problem: Your monorepo has multiple packages, each with their own node_modules, creating significant disk space usage. Solution: Scan from the monorepo root to find and manage all dependency folders across packages.
cd ~/monorepo
pumu list
Example Output for Monorepo:
πŸ”Ž Listing heavy dependency folders in '.'...
⏱️  Found 8 folders. Calculating sizes concurrently...

Folder Path                                              | Size
./packages/web/node_modules                              | 892.45 MB ⚨
./packages/api/node_modules                              | 567.32 MB ⚠️
./packages/shared/node_modules                           | 234.11 MB ⚠️
./apps/admin/node_modules                                | 678.90 MB ⚠️
./apps/mobile/.next                                      | 156.78 MB ⚠️
./packages/utils/node_modules                            | 89.23 MB
./tools/cli/target                                       | 1.12 GB 🚨
./packages/sdk/dist                                      | 45.67 MB
-------------------------------------------------------------------------------------
πŸ“‹ List complete! Found 8 heavy folders.
πŸ’Ύ Total space that can be freed: 3.76 GB
Tips:
  • Use interactive sweep to selectively clean specific packages
  • Build caches (.next, dist) are always safe to remove
  • Consider using prune mode for intelligent cleanup of stale packages
  • Some monorepos use workspace hoisting - Pumu detects both hoisted and per-package node_modules

Developer Onboarding (Free Up Space Quickly)

Problem: A new developer’s machine is running out of space after cloning multiple repositories with dependencies. Solution: Quick workflow to audit and free up space immediately. Step 1: See what’s taking up space
cd ~
pumu list --path ~/projects
Step 2: Use safe prune to remove only orphan and stale folders
cd ~/projects
pumu prune --dry-run          # Preview first
pumu prune --threshold 80     # Conservative cleanup
Step 3: For more aggressive cleanup, use interactive sweep
cd ~/projects
pumu sweep                    # Select folders interactively
Expected Space Savings:
  • Small workspace (5-10 projects): 2-5 GB
  • Medium workspace (20-30 projects): 10-20 GB
  • Large workspace (50+ projects): 30-50+ GB
Onboarding Checklist:
  • βœ… Run pumu list to audit disk usage
  • βœ… Use pumu prune for safe initial cleanup
  • βœ… Archive or delete old project folders entirely
  • βœ… Keep only active projects with dependencies installed
  • βœ… Set up regular cleanup schedule (weekly/monthly)

Common Workflows

Weekly Maintenance

cd ~/projects
pumu prune --dry-run
pumu prune
Free up space from stale folders automatically

Before Major Update

cd ~/project
pumu repair
Ensure dependencies are healthy before upgrading

Quick Space Check

pumu list
See what’s using space without making changes

Full Workspace Reset

cd ~/dev
pumu sweep --reinstall
Clean everything and reinstall fresh dependencies

Next Steps

Now that you understand how to use Pumu for different scenarios:

Commands Reference

Learn all available commands and flags in detail

Safety Features

Learn about Pumu’s safety mechanisms

Package Managers

See how Pumu detects and works with different ecosystems

Performance Tips

Optimize scanning and cleanup for large workspaces

Build docs developers (and LLMs) love