You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cd directory-to-prune
# delete all node_modules in a single rm commandfind . -name'node_modules'-type d -prune-execrm-rf'{}' +
# or delete folders one by one printing the folder being deletedfind . -name'node_modules'-type d -prune-print-execrm-rf'{}'\;
-prune will prevent find to recurse into node_module directories (to look for nested node_modules) {} is a placeholder which find replaces with the file path it found. + tells find to append all the file paths to a single command rather than running rm for each.