Skip to content

Instantly share code, notes, and snippets.

Avatar
🙄
I may be slow to respond.

Anand Prajapati anandprajapati1

🙄
I may be slow to respond.
View GitHub Profile
@anandprajapati1
anandprajapati1 / RemoveNodeModules.txt
Last active Jan 28, 2020
Delete all node modules from all projects to free up space(Windows)
View RemoveNodeModules.txt
// Open command prompt and enter below code
FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rd/s/q "%d" && echo "Removed.. %d"
// If you DO NOT want confirmation message before each removal, use blow
FOR /d /r . %d in (node_modules,dependencies,dist,".tmp") DO @IF EXIST "%d" rd/s/q "%d" && echo "Removed.. %d"
// Multiple folders can be specified as
FOR /d /r . %d in (node_modules,dist,".tmp") DO @IF EXIST "%d" rd/s/q "%d" && echo "Removed.. %d"
You can’t perform that action at this time.