Delete deep nested node_modules folders

Posted
Categorized as Code, Software Tagged , , ,

Some node modules have too much dependencies that break the WIndows NTFS file system e.g.(node-sass, gulp). There were articles mentioning that Windows 10 has removed the the limit to the maximum path length but I for one still encounter the problem… and for some reason the rm -rf command doesn’t work anymore.

So I use rimraf, which basically does what rm -rf does. Simply install it (globally) and run the command:

npm -g rimraf
rimraf <LONG_PATH_YOU_WANT_TO_DELETE>

Leave a Reply