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, then nvm uninstall followed by the version.
  • pyenv: pyenv versions, then pyenv uninstall followed by the version.
  • rbenv: rbenv versions, then rbenv uninstall followed 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.

Last reviewed

Also available as Markdown and JSON.