Find and remove all node_modules!

December 17, 2025 (1y ago)

0 views

You can use the following command to find and remove all node_modules directories from your laptop:

#!/bin/sh
sudo find /Users/cee/Desktop -name "node_modules" -exec rm -rf '{}' +

This command searches for all directories named node_modules starting from the /Users/cee/Desktop directory and removes them recursively.

Be cautious when using this command, as it will permanently delete all node_modules directories found in the specified path.

Make sure to replace /Users/cee/Desktop with the path where you want to start the search.

Find and remove all node_modules! | Cee