Created
July 21, 2017 08:14
-
-
Save LouiseMcMahon/e3720a2a24c1d0e9d79645ea958e40f0 to your computer and use it in GitHub Desktop.
List unused node versions in NVM
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
#This will list all node versions without an alias | |
$(nvm list | grep -v -e "->" | grep -P "(v\d+\.\d+\.\d+)" -o) | |
#This uses the above to find and remove node versions in NVM without an alias | |
for version in $(nvm list | grep -v -e "->" | grep -P "(v\d+\.\d+\.\d+)" -o) | |
do | |
nvm uninstall $version | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to declutter my unused node versions, thank you for this 🙏