Last active
March 18, 2020 07:50
-
-
Save nardan/af38db3e501022854a974cda57349b2f to your computer and use it in GitHub Desktop.
Deleting Node Modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Path "." -Include "node_modules" -Recurse -Directory | Remove-Item -Recurse -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" echo %d" | |
# FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" RMDIR /S /Q %d | |
FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" echo %d && RMDIR /S /Q %d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# find . -name "node_modules" -exec rm -rf '{}' + | |
find . -regextype posix-extended -regex "^.*(node_modules|package-lock.json|npm-shrinkwrap.json)$" -exec rm -rf '{}' + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment