isaacs/rimraf

A `rm -rf` util for nodejs

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 6 minutes ago
Added to GitGenius on September 11th, 2026
Created on February 8th, 2011
Open Issues & Pull Requests: 10 (+0)
GitHub issues: Enabled
Number of forks: 267
Total Stargazers: 5,848 (+0)
Total Subscribers: 38 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 11.8 hours
Mean response time: 85.3 days
90th percentile: 416.1 days
Tracked items: 15

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 470 days
Stale 30+ days: 3
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

rimraf is a cross-platform utility for Node.js that implements the Unix rm -rf command to recursively delete files and directories.

The tool solves the problem of safely removing file system entries in a platform-agnostic way. Node.js lacks a built-in recursive deletion function, and naive implementations often fail on Windows due to file locking and permission issues. rimraf handles these platform differences by using native implementations where available and falling back to a move-then-remove strategy on Windows when exponential backoff for busy file errors fails to resolve the situation. On POSIX systems, the implementation is simplified since the Windows-specific affordances are unnecessary.

Developers should use rimraf when they need reliable recursive deletion in build scripts, cleanup operations, or any Node.js application that must work across operating systems. The tool accepts either a single path or an array of paths, and removal functions return a boolean indicating whether all entries were successfully deleted. A filter option allows selective removal of entries. The tool is suitable for any project that requires cross-platform file system cleanup, though users must never pass untrusted input to it, as the tool is designed to aggressively and recursively remove all items it can find under a given target.

The project maintains active development with regular updates to support current Node.js versions. The codebase is written in TypeScript, providing type safety for users. The tool has undergone significant API evolution, moving from callback-based functions to Promise-based ones and simplifying the module structure to require direct imports of specific functions rather than relying on default exports. Recent versions have introduced platform-specific optimizations, including a native implementation preference on non-Windows systems and improved Windows handling strategies. The project tracks return values as booleans to indicate removal success, providing clearer feedback to callers about operation outcomes.