Skip to content

Instantly share code, notes, and snippets.

@KtanPatel
Created February 19, 2023 10:03
Show Gist options
  • Save KtanPatel/b910e23f9f550095ae67ffafb7f2342e to your computer and use it in GitHub Desktop.
Save KtanPatel/b910e23f9f550095ae67ffafb7f2342e to your computer and use it in GitHub Desktop.
// Create a .bat file and put that file at root of workspace directory
// Result: It will remove all `node_modules` directory from current and sub directories.
FOR /d /r . %%d IN (node_modules) DO @IF EXIST "%%d" rd /s /q "%%d"
@KtanPatel
Copy link
Author

for Linux:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment