2026 Update: Use FNM

  • fnm is a fully rust based node.js version manager and 10x faster than nvm. Works on Windows, Mac and Linux unlike nvm

  • Check which version of fnm is installed

  fnm --version
  • install a specific version of node
  fnm install 22.12.10
  • use a specific version of node
  fnm use 22.12.10
  • Check out all the fnm commands here

Older answer with nvm

To upgrade Node you may first want to see which version of Node.js you are currently using:

node --version

Find out which versions of Node.js you may have installed and which one of those you're currently using:

nvm ls

List all versions of Node.js available for installation:

nvm ls-remote

Apparently for Windows the command would be rather like this:

nvm ls available

Assuming you would pick Node.js v8.1.0 for installation you'd type the following to install that version:

nvm install 8.1.0

You are then free to choose between installed versions of Node.js. So if you would need to use an older version like v4.2.0 you would set it as the active version like this:

nvm use 4.2

That should be all.


In 2013 I used the following instructions to upgrade from Node.js version 0.10.6 to 0.10.21 on a Mac, for more recent instructions see above.

Update from 2017: Please mind, Mr. Walsh himself recommended to update Node.js just using nvm instead.

  1. Clear NPM's cache:

     sudo npm cache clean -f
    
  2. Install a little helper called 'n'

     sudo npm install -g n
    
  3. Install latest stable Node.js version

     sudo n stable
    

Alternatively pick a specific version and install like this:

sudo n 0.8.20

For production environments you might want to pay attention to version numbering and be picky about odd/even numbers.

Credits

  • General procedure: D.Walsh
  • Stable/unstable versions: P.Teixeira
Answer from Oliver Schafeld on Stack Overflow
🌐
Medium
arianallami.medium.com › how-to-update-node-version-c0d592d5f5c2
How to update Node version. Every now and then we have to update… | by Arian Al Lami | Medium
January 9, 2023 - First of all update your machine. you can download it from the node website · after the update if you use the same cmds it will should show you different version to update the npm version you use the below cmds
Top answer
1 of 16
1895

2026 Update: Use FNM

  • fnm is a fully rust based node.js version manager and 10x faster than nvm. Works on Windows, Mac and Linux unlike nvm

  • Check which version of fnm is installed

  fnm --version
  • install a specific version of node
  fnm install 22.12.10
  • use a specific version of node
  fnm use 22.12.10
  • Check out all the fnm commands here

Older answer with nvm

To upgrade Node you may first want to see which version of Node.js you are currently using:

node --version

Find out which versions of Node.js you may have installed and which one of those you're currently using:

nvm ls

List all versions of Node.js available for installation:

nvm ls-remote

Apparently for Windows the command would be rather like this:

nvm ls available

Assuming you would pick Node.js v8.1.0 for installation you'd type the following to install that version:

nvm install 8.1.0

You are then free to choose between installed versions of Node.js. So if you would need to use an older version like v4.2.0 you would set it as the active version like this:

nvm use 4.2

That should be all.


In 2013 I used the following instructions to upgrade from Node.js version 0.10.6 to 0.10.21 on a Mac, for more recent instructions see above.

Update from 2017: Please mind, Mr. Walsh himself recommended to update Node.js just using nvm instead.

  1. Clear NPM's cache:

     sudo npm cache clean -f
    
  2. Install a little helper called 'n'

     sudo npm install -g n
    
  3. Install latest stable Node.js version

     sudo n stable
    

Alternatively pick a specific version and install like this:

sudo n 0.8.20

For production environments you might want to pay attention to version numbering and be picky about odd/even numbers.

Credits

  • General procedure: D.Walsh
  • Stable/unstable versions: P.Teixeira
2 of 16
751

Use Node Version Manager (NVM)

It's a Bash script that lets you download and manage different versions of node. Full source code is here.

There is a separate project for nvm for Windows: github.com/coreybutler/nvm-windows

Below are the full steps to use NVM for multiple version of node on windows

  1. download nvm-setup.zip extract and install it.
  2. execute command nvm list available from cmd or gitbash or powershell, this will list all available version of node
  3. use command nvm install version e.g. nvm install 12.14.0 to install on the machine
  4. last once installed use nvm use version to use newer version e.g. nvm use 12.14.0
Discussions

How to update node on my WSL Ubuntu?
In general, for your local setup, I would recommend to use NVM https://github.com/nvm-sh/nvm More on reddit.com
🌐 r/node
8
1
April 21, 2024
Update a node to Last version without modifying all the others
Describe the problem/error/question Is there a simple way to update a node to the latest version? If I recreate a new node to get the latest version, I have to copy all my settings, and then modify all the other nodes that reference it since the name has changed… More on community.n8n.io
🌐 community.n8n.io
1
1
January 12, 2025
How to update Node.js under homebridge? UI

Open terminal in the Homebridge UI and then use this command: sudo hb-service update-node

Source: https://github.com/homebridge/homebridge/wiki/How-To-Update-Node.js

More on reddit.com
🌐 r/homebridge
29
16
March 30, 2019
How do I update npm and Node.js to the latest versions? - LambdaTest Community
I recently installed Node.js and npm, but I realized both are outdated. I’d like to know the correct way to update npm and Node.js to their latest stable versions without breaking my existing setup. Should I uninstall and reinstall them, or is there a cleaner upgrade path? More on community.lambdatest.com
🌐 community.lambdatest.com
0
July 1, 2025
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to update node.js version {linux, windows, & macos}
How to Update Node.js Version {Linux, Windows, & macOS}
June 12, 2025 - 3. Close and reopen the terminal ... of the list to find the latest one. 7. To install the latest version, use the nvm command with the specific Node.js version:...
🌐
freeCodeCamp
freecodecamp.org › news › how-to-update-node-and-npm-to-the-latest-version
How to Update Node and NPM to the Latest Version
April 12, 2022 - This command will install the latest version of NPM globally. On Mac, you may have to pass the sudo command before NPM, as this installs NPM at the root of your device, and you need privileges to do that. In this article, we've seen how to update Node and NPM to their latest versions.
🌐
NodeSource
nodesource.com › blog › Update-nodejs-versions-on-windows
How to Update Node.js Versions on Windows
February 4, 2025 - To determine whether your installed version is still actively maintained, visit the Node.js release schedule. One of the easiest ways to update Node.js on Windows is by using the official Node.js installer.
Top answer
1 of 16
1896

Use n module from npm in order to upgrade node

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

To upgrade to latest version (and not current stable) version, you can use

sudo n latest
  • Fix PATH:

      sudo apt-get install --reinstall nodejs-legacy     # fix /usr/bin/node
    
  • To undo:

      sudo n rm 6.0.0     # replace number with version of Node that was installed
      sudo npm uninstall -g n
    

You may need to restart your terminal to see the updated node version.

Found in David Walsh blog

2 of 16
666

NodeSource provides binary distributions of Node.js; complete installation instructions can be found here. The instructions have been copied below for your reference. Instructions are the same for updating to the latest version.

Run once:

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

Run whenever you want to change the major version of Node.js:

NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y

Prior to August 2023: Previously versions of this answer involved the use of a series of setup_XX.x scripts that you'd run to install/update Node.js:

curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs

But as @eis pointed out, these scripts are no longer supported. To see the previous answers, please look at the edit history for this answer.

🌐
NodeSource
nodesource.com › blog › update-Node.js-versions-on-MacOS
How to Update Node.js Versions on MacOS
January 31, 2025 - In this guide, we’ll walk through different methods to updated Node.js in MacOS, including Homebrew, Node Version Manager (nvm), and manual installation.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › update-node-js-and-npm-to-latest-version
How to Update Node.js and NPM to the Latest Version (2025) - GeeksforGeeks
July 15, 2025 - To update Node and NPM to the latest versions we can use various methods like nvm (node version manager), node.js Windows installer, npm, and homebrew for macOS.
🌐
Mend
mend.io › blog › how-to-update-node-js-to-latest-version
How To Update Node.js To Latest Version
October 31, 2024 - Before installing nvm-windows, it’s recommended to uninstall any available Node.js versions from your machine. This will avoid potential conflict issues during installation. Next, you can download and run the latest nvm-setup.zip installer. Also, since the utility runs in an Admin shell, you’ll need to begin the Command Prompt or Powershell as an Administrator before using it. If you want to install and upgrade to a specific version, you can run the following: You can specify to update to the newest LTS version by running:
🌐
GitHub
github.com › homebridge › homebridge › wiki › How-To-Update-Node.js
How To Update Node.js
Users running in Docker should update Node.js by pulling down the latest version of the Homebridge Docker Image. Please note that we moved the Homebridge Docker image into the homebridge domain in the spring of 2023, and if your install predates ...
Author   homebridge
🌐
Vultr
docs.vultr.com › how-to-upgrade-a-node-js-version-on-ubuntu
How to Upgrade a Node.js Version on Ubuntu | Vultr Docs
May 22, 2025 - Replace <version> with the major version number followed by .x, such as 20.x or 22.x. For supported versions, visit the NodeSource distributions page. ... Update the package index. ... Install Node.js. ... Confirm that npm was installed alongside Node.js. ... The Node.js package from NodeSource includes npm by default, so you don’t need to install it separately.
🌐
Reddit
reddit.com › r/node › how to update node on my wsl ubuntu?
r/node on Reddit: How to update node on my WSL Ubuntu?
April 21, 2024 -

I have downloaded node on my win and it shows 20.11.1 while using node -v command. but when I use the same command on wsl ubuntu it shows v10.19.0. how to update it on wsl?

installed node using sudo apt install node

🌐
LambdaTest Community
community.lambdatest.com › general discussions
How do I update npm and Node.js to the latest versions? - LambdaTest Community
July 1, 2025 - I recently installed Node.js and npm, but I realized both are outdated. I’d like to know the correct way to update npm and Node.js to their latest stable versions without breaking my existing setup. Should I uninstall …
🌐
The Valley of Code
thevalleyofcode.com › how-to-update-node
How to update Node.js
The official package contains an installer that will detect the existing version of Node.js and it will overwrite it with the new one. Homebrew is a very popular way to install Node.js on a Mac. If you did use Homebrew, upgrading Node is as simple as running · brew update #makes sure Homebrew is up to date brew upgrade node
🌐
DEV Community
dev.to › jeromechoo › a-step-by-step-guide-to-updating-your-legacy-nodejs-app-in-2024-v10-to-v22-5h4h
A Step By Step Guide to Updating Your Legacy Node.js App in 2024 (v10 to v22) - DEV Community
July 18, 2025 - We'll remove node-sass and the corresponding node-sass-middleware packages from package.json, replacing it with the latest version of sass. $ npm uninstall --save node-sass node-sass-middleware $ npm install --save sass · xcellent! We're on our way. Before we move forward, let's be sure to update our import references in the code.
🌐
Node.js
nodejs.org › en › download
Node.js — Download Node.js®
BashCopy to clipboard and their installation scripts are not maintained by the Node.js project. If you encounter any issues please visit 's website ... Read the changelog or blog post for this version.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-node-js-on-ubuntu-20-04
How to Install Node.js on Ubuntu | DigitalOcean
May 2, 2025 - # Update Node.js using apt sudo apt update && sudo apt full-upgrade # Update Node.js using NVM nvm install node --latest · There are several ways to set up Node.js on your Ubuntu server, each with its own advantages. Whether you choose to use the packaged version, nvm, or a NodeSource PPA, ...
🌐
Node.js
nodejs.org › en
Node.js
Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts. Get Node.js®Get Node.js®Get security support for EOL Node.js versions