
How to update to the latest Node.js version?
IT Updated on : October 3, 2025Node.js is among the most popular JavaScript runtimes, primarily used for developing scalable, high-performance applications. Regardless of other technologies, keeping Node.js up to date is vital for ensuring better performance, security, and access to the latest features. In this guide, we outline how to update Node.js using various methods, regardless of whether you are using macOS, Windows, or Linux.
What is Node.js, and Why Update It?
Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside a web browser. It’s commonly used for server-side programming, APIs, real-time apps, and microservices. According to the available data, Node.js powers over 6.3 million websites worldwide, making it one of the most widely adopted JavaScript runtimes.
Updating Node.js ensures you:
- Stay secure – Each release fixes bugs and vulnerabilities.
- Boost performance – New versions often run faster and handle more requests.
- Unlock new features – Access the latest ECMA script standards and Node APIs.
If you are wondering how to update the Node version or upgrade Node.js to the latest version, multiple methods are available, depending on your system and preferences.
Check Your Node.js Version
Before and after upgrading, always verify your Node.js version:
node -v
This command displays the installed version, confirming if the update was successful.
Methods to Update Node.js Version
OS | Method |
Windows | NVM (Recommended) |
Chocolatey | |
Winget | |
macOS | Homebrew |
Manual Installer | |
Linux | NVM (Recommended) |
Package Manager (Ubuntu/Debian) | |
Package Manager (Fedora/CentOS) | |
NodeSource (Latest) | |
NodeSource (LTS) | |
Manual Binary |
Methods to Update Node.js Version for Windows, MacOs, and Linux
1. Using Node Version Manager (NVM) [Recommended]
NVM is the easiest and most flexible way to install and manage multiple Node.js versions. This method is applicable for Windows, Linux, or macOS
Steps:
-
- Install NVM (follow the official installation guide).
- Check available versions:
nvm ls-remote
-
- Install the latest version:
nvm install Node
-
- Use a specific version:
nvm use 20
With NVM, switching between Node versions is effortless, making it the preferred option for most developers.
2. Using NPM (Node Package Manager)
While NPM primarily manages packages, it can also help update Node.js through the n package.
Steps:
-
- Install n:
npm install -g n
-
- Update to the latest stable version:
n stable
-
- For the latest version:
n latest
3. Using Node.js installer
If you are on Windows or macOS, you can download the official installer from the Node.js website.
Steps:
-
- Visit the Node.js downloads page.
- Choose LTS (Long Term Support) or the Current version.
- Run the installer and follow the setup wizard.
- Verify the update:
node -v
Methods to Update Node.js For Windows
1. Updating via Chocolatey (For Windows)
Chocolatey is another package manager for Windows, through which you can update and install Node.js
Installing Chocolatey
If you don’t have Chocolately installed, you can open PowerShell as an administrator and run the following command.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString
-
- Update Node.js to the latest version
choco upgrade nodejs
-
- Verify the installation
node -v
2. Using Winget (Windows Package Manager)
Winget is a Windows package manager in Windows 10 and 11 that allows running and updating the Node.js version
-
- Open the command prompt or PowerShell as an administrator.
- To update the Node.js version, run the following command
winget upgrade –id OpenJS.NodeJS -e –source winget
-
- Verify the Update
node-v
Methods to Update Node.js For MacOS
1. Using Homebrew (For MacOs)
Homebrew is among the famous package managers for macOS through which you can update the Node.js version. Follow the steps below;
Steps:
-
- Ensure you have updated Homebrew, and if not, you can update it by running the following command.
brew update
-
- Update the node.js latest version
brew upgrade node
-
- Verify the update
node -v
2. Manually Updating Node.js Version
-
- Visit the website and download the macOS installer (.pkg).
- Run the installers and update the version by following the on-screen instructions during the installation.
- Verify the Installation.
node -v`
npm -v
Methods to update Node.js for Linux
1. Using Package Manager
On Linux, you can update Node.js via your system’s package manager.
For Ubuntu/Debian:
sudo apt update
sudo apt install -y nodejs
For Fedora/CentOS:
sudo dnf module install nodejs:20
This ensures you are running the latest version available in your distro’s repositories.
2. Using NodeSource Binary Distribution
NodeSource is another recommended method for updating Node versions on Linux.
Steps:
-
- Add the Nodesource repository and ensure that the Nodesource repository is set up.
- For the latest Node.js version
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -`
3. For the LTS Node.js version
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash –
4. For a Specific version
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
5. Manually Update Node.js version
-
- Download the updated and latest Node.js binary
curl -fsSL https://nodejs.org/dist/latest/node-v23.8.0-linux-x64.tar.xz -o node.tar.xz
-
- Extract the file
tar -xf node.tar.xz
-
- Move your extracted file
usr/local:sudo mv node-v20.8.0-linux-x64 /usr/local/nodejs
-
- Update the PATH of the system
echo ‘export PATH=/usr/local/nodejs/bin:$PATH’ >> ~/.bashrc
-
- source ~/.bashrc
tar -xf node.tar.xz
-
- Verify the Installation
node -v
Node.js Latest Versions
Node.js | Codename | First Released | Last Updated |
v24 | – | May 06, 2025 | Sep 25, 2025 |
v23 | – | Oct 16, 2024 | May 14, 2025 |
v22 | Jod | Apr 24, 2024 | Sep 24, 2025 |
v21 | – | Oct 17, 2023 | Apr 10, 2024 |
v20 | Iron | Apr 18, 2023 | Sep 03, 2025 |
v19 | – | Oct 18, 2022 | Apr 10, 2023 |
( Source: Node.js )
Conclusion
Keeping Node.js up to date is crucial for developers seeking optimal performance, security, and access to the latest features. Whether you choose NVM, NPM, the official installer, or a package manager, updating is straightforward. Now that you know how to update Node.js, ensure you stay current to build faster, more secure, and modern applications.
Frequently Asked Questions (FAQ)
Q 1. How do I update Node using NPM?
Ans. You can install the n package globally and run n latest to upgrade Node.js using npm.
Q 2. Is Node 20 faster than Node 18?
Ans. Yes. Node.js 20 features improved performance, enhanced V8 engine support, and improved security compared to Node 18.
Q 3. Which is the latest Node.js version: 22 or 23?
Ans. The latest release as of now is Node.js 22 (Current). Node.js follows an even-numbered LTS and odd-numbered Current release cycle.
Q 4. What is the current Node.js version?
Ans. The current stable version changes frequently. You can always check the latest release on the official Node.js website.
Q 5. Do you need any tools to upgrade Node.js to the latest version?
Ans. You can update without extra tools using the installer, but using NVM or npm’s n package makes the process easier and more flexible.
Q 6. How do I check my current Node.js version?
Ans. Run node-v in your terminal to see the installed version.