Skip to content

Instantly share code, notes, and snippets.

@dmythro
Created July 1, 2014 12:57
Show Gist options
  • Save dmythro/36932c2c62eb74200995 to your computer and use it in GitHub Desktop.
Save dmythro/36932c2c62eb74200995 to your computer and use it in GitHub Desktop.
NPM: Uninstall all Global modules
#!/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
@chrisschreiner
Copy link

does not work

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