For those who don’t care much about comments, here’s the post in which I address this node-inspector issue. rimraf works pretty well for this task. Given that rimraf is a lot slower than the most obvious alternative rm -rf, the obvious solution would be to use that instead. The npm package rimraf receives a total of 50,373,804 downloads a week. We have the following script call in our npm scripts list "scripts": { "clean": "rimraf assets/tpl/dist/*" } Unfortunately Windows does not understand the /* on our command line. rimraf was bulit by the creator of npm in 2011 (back in the day when NodeJS was just beginning to gain traction). rimraf to the Rescue. It might be nice to have something that does this that also has RegEx support, but most of the time globs get the job done just fine. The rimraf package which you will probably find in the devDependencies section of the package.json you have, is used to safely remove files and folders on all platforms (Unix and Windows).. API. Install with npm install rimraf, or just drop rimraf.js somewhere. rimraf(f, [opts], callback) The first parameter will be interpreted as a globbing pattern for files. Codota search - find any JavaScript module, class or function The rimraf executable is a faster alternative to the rm -rf shell command. So, the sol u tion to a cross-platform npm clean script is rimraf. In most cases, all will be okay and you’ll be able to use it without a problem. Based on project statistics from the GitHub repository for the npm package rimraf, we found that it has been starred 4,171 times, and that 123,069 other projects in the ecosystem are dependent on it. rimraf is "the UNIX command rm -rf for node". If not, head to the comments, and we’ll take care of it together! npm trends. rimraf. If you want to disable globbing you can do so with opts.disableGlob (defaults to false). Properly. rimraf. Don’t panic :), just try to run rimraf instead, as noted above. Then at any time at the command line we can dispose of a long path in 2 shakes of lamb's tail. This is just a guess, but I would say that it is a way to pronounce the command rm -rf remove, recursive, force removal. A deep deletion module for node (like `rm -rf`) rimraf; Stats. Recalling my conversation last year, one main point that was raised was that rimraf was written specifically for cross-platform usage. Compare npm package download statistics over time: rimraf. (By the way, what is it with node and the pathological hatred of capital letters?) Be sure to check out my other posts on node.js, and npm packages . So let's get it: npm install -g rimraf. What this means is: rimraf can delete. Learn more. When you have a build system, you want to also make sure you remove the output files before re-emitting the build output content (especially in case you have removed some files which are not needed anymore). As such, we scored rimraf popularity level to be Key ecosystem project.