finds.dev← search

// the find

isaacs/rimraf

★ 5,849 · TypeScript · BlueOak-1.0.0 · updated May 2026

A `rm -rf` util for nodejs

rimraf is the standard cross-platform recursive delete for Node.js, essentially what you reach for when `fs.rm` isn't enough or you need Windows reliability. It's been around since the early Node ecosystem and v4+ dropped the callback API in favor of Promises. Most people use it in build scripts and test teardown.

The Windows handling is genuinely good — the move-then-remove fallback for EBUSY and the exponential backoff for locked files solves a real problem that `fs.rm` still fumbles on Windows. The pluggable implementation strategy (native, manual, posix, windows, move-remove) lets you override the default if you're debugging a weird platform issue. AbortSignal support is a nice touch for deleting massive trees with a timeout budget. The test suite is thorough with per-implementation coverage and snapshot tests for the CLI.

Requiring Node 20 or >=22 (skipping 21) in v6 will catch people off-guard on LTS-pinned CI setups. The `--impl=native` flag silently drops `--verbose` and `--interactive` support — that inconsistency will confuse anyone who reads the help output and tries both. The `moveRemove` strategy can leave `.filename.0.123412341` temp files scattered in the parent directory on failure, with no built-in cleanup pass. At this point it's also largely redundant with `fs.rm` on modern Node — the main reason to reach for it is Windows or the filter/glob options, but the README doesn't make that tradeoff obvious upfront.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →