TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸

Uninstall a Node.js version using Volta on macOS

December 11, 2024

If you're using Volta to manage Node.js versions on your computer, you might have noticed that running volta uninstall node-version command doesn't work as expected. This expectation comes from using other Node.js version managers like NVM, unlike Volta, which requires removing each version manually.

Check all installed Node.js versions

Before removing any versions, to see a list of installed Node.js versions on your macOS, run:

code
volta ls node

This command will display all runtimes installed:

code
⚡️ Node runtimes in your toolchain:

    v18.17.1
    v20.12.2
    v20.17.0 (default)
    v22.4.0
    v22.11.0

The default is the version I am actively using.

Remove an installed version manually

  1. To remove a specific version, navigate to the Volta's installation directory:
code
cd ~/.volta/images/node
  1. All Node.js runtimes are installed inside their own version directory. Delete a directory for the version you want to remove:
code
rm -rf v22.11.0
  1. Verify the removal by running volta ls node again:
code
⚡️ Node runtimes in your toolchain:

    v18.17.1
    v20.12.2
    v20.17.0 (default)
    v22.4.0

Complete Volta uninstallation

If you need to remove Volta entirely from your macOS, you can delete the .volta directory:

code
rm -rf ~/.volta

Summary

Compared to tools like nvm, Volta's approach to Node.js version management is a bit different considering this manual process.