Remove all node_module folders recursively

Remove all node_module folders (or any type of folder/file)

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






That will delete the folder and files even if there is a space in the name.
That saved me about 5GB over several hundred node projects which I had not touched in a while.
If I need the node modules back, I can simply run npm install





Written by S.Lacy

reproduce  https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively

Popular posts from this blog

Fancyapps — easily build overlay windows with carousel

Meet Mantine: A TS-Based Open-Source React Components Library

Meet Tippy.js: The Complete Tooltip Popover Plugin