Skip to content

Instantly share code, notes, and snippets.

@exaucae
Last active April 16, 2021 12:42
Show Gist options
  • Save exaucae/e1e2eeb9357fbfc5874bc6082d75e18f to your computer and use it in GitHub Desktop.
Save exaucae/e1e2eeb9357fbfc5874bc6082d75e18f to your computer and use it in GitHub Desktop.
Delete all nodules like a pro
Here are two way to delete node modules.
# The hard way
- cd into your target folder and according to your OS, run the appropriate command
- linux based systems: find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
- windows: FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rm -rf "%d"
# the easy way
- install npmkill
npm i -g npkill
- move to your base directory holding targetted node_modules and run this ccommand
npkill -d your-base-directory
Reference:
- npmkill: https://www.npmjs.com/package/npkill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment