Skip to content

Techeons

Imagine | Explore | Innovate

Menu
  • Home
Menu

How to easily switch between NodeJS versions using n

Posted on September 3, 2024

Install n

Open your terminal.

Run the command:

npm install -g n

    Switch to a specific Node.js version

    Run the command:

    n <version>

    (replace <version> with the desired version, e.g., n 16.17.0)

    Verify the version change by running:

    node -v

      Switch to the latest Node.js version

      Run the command:

      n latest

      Verify the version change by running:

      node -v

        List all installed Node.js versions

        Run the command:

        n ls

          Uninstall a specific Node.js version

          Run the command:

          n rm <version>

            (replace <version> with the version you want to uninstall)

            Share on Social Media
            x facebook pinterest linkedin tumblr reddit emailwhatsapptelegrammastodon

            Leave a Reply Cancel reply

            You must be logged in to post a comment.

            Recent Posts

            • Nginx: How to increase timeout for Nginx
            • Cheat Sheet: Essential Git Commands
            • Setting a default shell in Linux
            • Setting up Composer on Linux
            • Switch easily between Python versions on a Mac using pyenv

            Tags

            ai alerting aws b2 backblaze certificate cheatsheet cloud commands data-science datalake devops dns docker dremio git gitlab infra jenkins kubernetes linux metabase minikube minio monitoring mount mysql nginx nodejs notebooks openssh php python scala secrets spark ssh ssl ubuntu ufw usb web dev tools windows xampp zeppelin

            ©2026 Techeons | Design: Newspaperly WordPress Theme