Skip to content

Instantly share code, notes, and snippets.

@yaditya
Last active January 3, 2018 05:54
Show Gist options
  • Save yaditya/af02bcb2048130d3d201 to your computer and use it in GitHub Desktop.
Save yaditya/af02bcb2048130d3d201 to your computer and use it in GitHub Desktop.
If you want to view all released versions of an npm package, there’s an easy way to do it:
npm show react-native@* version
However, this doesn’t show pre-release versions. If you want to see everything, there’s an equally easy (but undocumented) command:
npm show react-native versions --json
https://gist.github.com/AvnerCohen/4051934
See all versions of a node module
---------------------------------
npm view [webpack] versions --json
List all installed npm globally
--------------------------------
npm list -g --depth=0
Uninstall script
----------------
for package in `ls node_modules`; do npm uninstall $package; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment