Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lorinma/167f09399f73549c9bdadc107a4176b5 to your computer and use it in GitHub Desktop.
Save lorinma/167f09399f73549c9bdadc107a4176b5 to your computer and use it in GitHub Desktop.
linux:
npm ls -gp --depth=0 | awk -F/ '/node_modules/ && !/\/npm$/ {print $NF}' | xargs npm -g rm
For those using Windows, the easiest way to remove all globally installed npm packages is to delete the contents of:
C:\Users\username\AppData\Roaming\npm
You can get here quickly by typing %appdata% (either in explorer, run prompt, or start menu).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment