I got tired of waiting for node_modules to delete, so I built rmbrr. On my box it takes 44% less time than rimraf on Windows (1.8s vs 3.2s) and 61% less time on WSL (192ms vs 660ms).
The approach: single-pass recursive scan builds a dependency graph, then parallel workers delete bottom-up. As soon as a directory’s last child completes, it’s automatically queued for deletion.
On Windows, I use POSIX delete semantics (FILE_DISPOSITION_POSIX_SEMANTICS via SetFileInformationByHandle) which gives immediate namespace removal and handles read-only/in-use files without retry loops.
On Unix, same parallel architecture using standard syscalls.
Written in Rust, ships as a native binary with optional npm/brew/cargo for easy installation.
GitHub: https://github.com/mtopolski/rmbrr
npm: https://www.npmjs.com/package/rmbrr
Benchmark details in README – tested on 28K+ file node_modules directories.
Comments URL: https://news.ycombinator.com/item?id=45844626
Points: 1
# Comments: 0
Source: news.ycombinator.com