wipejs
v1.0.0
Published
High-performance recursive node_modules removal tool
Maintainers
Readme
roomba-js
⚡ High-performance recursive node_modules removal tool for Node.js projects.
Features
- 🚀 Ultra-fast - Parallel processing with worker threads
- 🔍 Smart scanning - Recursively finds all
node_modulesfolders - 🛡️ Safe removal - Optional protection for workspace projects
- 💾 Size tracking - Reports disk space freed
- 🔒 Dry run mode - Preview before deletion
- 🖥️ Cross-platform - macOS, Windows (WSL/x86/x64/ARM), Linux
Installation
Global
npm install -g roomba-jsLocal
npm install --save-dev roomba-jsnpx (no install required)
npx roomba-jsUsage
Basic usage (cleans current directory)
roomba-jsClean specific directory
roomba-js /path/to/projectDry run (preview only)
roomba-js --dry-runVerbose output
roomba-js --verboseForce removal (skip protection checks)
roomba-js --forceCustom worker count
roomba-js --concurrent 8Options
[path]- Directory to clean (default: current directory)-d, --dry-run- Show what would be removed without actually removing-v, --verbose- Verbose output-f, --force- Force removal without protection checks-c, --concurrent <number>- Number of concurrent workers-h, --help- Display help--version- Display version
Performance
roomba-js uses multiple techniques for maximum performance:
- Parallel processing with Node.js worker threads
- Batch processing to optimize I/O operations
- Smart caching to minimize filesystem calls
- Chunked removal to handle large directories efficiently
Typical performance: 10-50x faster than rm -rf for large projects.
Safety Features
- Workspace detection - Protects npm/yarn workspaces by default
- Dry run mode - Preview before deletion
- Error handling - Continues on individual folder failures
- Progress tracking - Real-time status updates
Examples
# Clean current directory with verbose output
roomba-js --verbose
# Preview what would be cleaned in a monorepo
roomba-js /path/to/monorepo --dry-run
# Force clean all node_modules (bypass protections)
roomba-js --force
# Use 4 parallel workers
roomba-js --concurrent 4API
const { RoombaCleaner } = require('roomba-js');
const cleaner = new RoombaCleaner({
dryRun: false,
verbose: true,
force: false,
concurrent: 4
});
await cleaner.clean('/path/to/project');License
MIT
