Created
July 1, 2014 12:57
-
-
Save dmythro/36932c2c62eb74200995 to your computer and use it in GitHub Desktop.
NPM: Uninstall all Global 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
#!/bin/bash | |
# Uninstall all Global modules from NPM | |
# http://stackoverflow.com/questions/9283472/command-to-remove-all-npm-modules-globally | |
npm -g ls | grep -v 'npm@' | awk '/@/ {print $2}' | awk -F@ '{print $1}' | xargs npm -g rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
does not work