Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to clear all node_modules recursively

# delete using package
npx npkill
# or list folders using bash
find . -name 'node_modules' -type d -prune
# or delete folders using bash
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
# or use trash on mac
brew install trash
find . -name node_modules -type d -prune -exec trash {} +
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #clear #recursively
ADD COMMENT
Topic
Name
3+3 =