HomeNotesDelete a folder recursively from a specified path

Delete a folder recursively from a specified path

2022-05-16
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 '{}' +
Copyright © 2025 Daniel Nguyen