Answers for "recursively delete node_modules"


recursively delete node_modules

find . -name "node_modules" -type d -exec rm -rf '{}' +
Posted by: Guest on April-12-2021

delete all node_modules folders recursively windows

This is for windows  - type on the command line to list all node_modules folders:
For /d /r . %d in (node_modules) Do @IF EXIST "%d" echo %d

To delete all the listed folders:
For /d /r . %d in (node_modules) Do @IF EXIST "%d" del /Q "%d"

The /Q flag is "Quiet mode" - Does not ask if ok to delete on global wildcard
Posted by: Guest on July-05-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language