Remove all node_module folders recursively

Not every developer can afford a well-specced machine. I personally am still using a 13" 2016 MacBook Air with only 128GB of storage. I dive into projects that use Node every now and then and sometimes I find myself needing a bit of extra space to work on new projects.

If you work on multiple projects, node modules can quickly take up the available space on your machine. A 128GB is not a lot of space and you will soon have to clean up your machine. Here is how:

find . -name "node_modules" -exec rm -rf '{}' +

You can always re-install the modules again if you ever have to work on the project again in the future by simply running:

npm install

Code, music, craft beer and traveling to remote areas are the only real languages I speak.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store