nvmermind v1.0.1
😒 nvmermind
Uninstall old versions of Node.js (as installed by nvm) while keeping the latest of each major version.
If you have a stinking bonepile of old Node.js versions in your ~/.nvm folder, this script takes out the trash.
Install
You could install this, but maybe better to...
Usage
Run:
npx nvmermindnvmermind will keep the latest installed version of each major it finds.
Example: if you have
v14.16.1andv14.17.0installed, it will removev14.16.1and keepv14.17.0.
nvmermind will show you:
- what would be removed
- what will be kept
- how much disk space you'll recover
nvmermind will confirm with you (a human) before blasting anything away.
API
There's an "API", sure. You can require('nvmermind'), but I don't feel like documenting it. Maybe next week? There are some docstrings, which is better than nothing.
New in v1.0.0: There are types now; look at those if you want. I'm still not gonna document it.
Usage Notes
- Removal uses
nvm uninstall, which does its thing safely and methodically (read: slowly). nvmermindaccepts no options, arguments, flags, or anything else. There is no man page and no--help.- This should work on Windows insofar as
nvmworks on Windows.
Acknowledgments
- I stole some code from Wes Todd's nvmjs. I should probably send a PR.
License
Copyright © 2021 Christopher "boneskull" Hiller. Licensed Apache-2.0