HomePostsDelete a folder recursively from a specified path

Delete a folder recursively from a specified path

May 16, 2022
0 minutes read

I need to delete all node_modules (other) folder recursively from a specified path using the command line interface. Here's what I use.

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