Mac storage basics · Programming languages and toolchains
How do I remove old Node, Python or Ruby versions installed with a version manager?
Short answer: List versions (nvm ls, pyenv versions, rbenv versions) and uninstall the ones no project pins. Each removed version takes its global packages with it.
Version managers keep every version you've installed, each with its own packages. List and remove the ones you no longer use:
- nvm:
nvm ls, thennvm uninstallfollowed by the version. - pyenv:
pyenv versions, thenpyenv uninstallfollowed by the version. - rbenv:
rbenv versions, thenrbenv uninstallfollowed by the version.
Keep the version your projects pin (check files like .nvmrc or .python-version). Packages installed globally for a removed version go with it. Package caches are separate — see npm, yarn and pip caches.