Here's how I successfully upgraded from v0.8.18 to v0.10.20 without any other requirements like brew etc, (type these commands in the terminal):

  1. sudo npm cache clean -f (force) clear you npm cache
  2. sudo npm install -g n install n (this might take a while)
  3. sudo n stable upgrade to the current stable version

Note that sudo might prompt your password.

Additional note regarding step 3: stable can be exchanged for latest, lts (long term support) or any specific version number such as 0.10.20.

If the version number doesn't show up when typing node -v, you might have to reboot.

These instructions are found here as well: davidwalsh.name/upgrade-nodejs
More info about the n package found here: npmjs.com/package/n
More info about Node.js' release schedule: github.com/nodejs/Release

Answer from Johan Dettmar on Stack Overflow
🌐
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.
🌐
Better Stack
betterstack.com › community › questions › how-to-upgrade-node-js-on-macos
How to Upgrade Node.js to the Latest Version on Mac OS? | Better Stack Community
Download the latest version of Node.js for macOS. Once the download is complete, open the installer and follow the installation instructions. After installation, open a new terminal window and verify that Node.js has been updated: ... Remember ...
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › how-to-upgrade-nodejs-to-the-latest-version-on-macos
How to Upgrade NodeJS To The Latest Version on MacOS? - GeeksforGeeks
July 23, 2025 - The very first step is to make sure that Homebrew installation on your machine is current. Open your terminal and perform the commands below to verify that Homebrew is currently up to date. ... Now that Homebrew is up to the minute, you might proceed in this way. Use this command to upgrade Node.js.
🌐
Bytearcher
bytearcher.com › articles › ways-to-get-the-latest-node.js-version-on-a-mac
4 ways to update to the latest Node.js version on a Mac
Assuming you have previously installed node with brew install node. You can get up-to-date with formulae and upgrade to the latest Node.js version with the following. ... MacPorts is the other package manager for Mac. The following will update the local ports tree to get access to updated versions.
🌐
MacPaw
macpaw.com › how to › optimization › apps
How to update Node version on Mac
February 26, 2025 - There are a few options for updating Node.js on your Mac. If you have the Node version manager (nvm) installed, you can use that. If you don’t have nvm installed, you can either install it and then use it to update Node.js, or you can update Node.js manually.
🌐
OpenReplay
blog.openreplay.com › update-node-npm-guide
How to Update Node and NPM on Windows, Mac, and Linux (2024 Guide)
This guide provides step-by-step instructions on how to update Node.JS and NPM on Windows, Mac, and Linux in 2024.
🌐
OS X Daily
osxdaily.com › 2024 › 07 › 02 › how-update-node-js-latest-version-mac
How to Update Node.js to Latest Version on Mac
September 30, 2024 - Optional, but not necessary, is to first check which version of node.js and npm you have installed on the Mac, which is possible with the following command: ... Now, you will want to update Homebrew, so that Homebrew itself can retrieve the latest versions of software: brew update
Find elsewhere
🌐
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.
🌐
Bacancy Technology
bacancytechnology.com › qanda › node › update-node-js
How To Update NodeJS Versions Using Mac, Windows, and Linux
January 25, 2024 - Here are steps to update Nodejs versions on Mac, Windows, and Linux most efficiently.
🌐
Amikelive
tech.amikelive.com › node-1340 › how-to-update-node-js-on-macos-hindsight-on-old-mac
How To Update Node.js on MacOS: Hindsight on Old Mac | Amikelive | Technology Blog
September 13, 2025 - There are several avenues available, ... various tools available on Mac. Now consider a case for updating Node.js (and subsequently npm) on MacOS. What are the options? tl;dr Updating Node.js with lightweight package manager such as n is less error prone especially for older MacOS version...
🌐
Medium
medium.com › macoclock › update-your-node-js-on-your-mac-in-2020-948948c1ffb2
The easiest way to update your Node.js on your Mac | by Joe T. Santhanavanich | Mac O’Clock | Medium
March 6, 2023 - ... (Use this command to install the stable node release.) $ sudo n stable(Use this command to install/update the latest node release.) $ sudo n latest(Use this command to install/update the latest LTS node release.)
🌐
DEV Community
dev.to › alikarbasicom › the-fastest-way-to-update-nodejs-on-your-mac-20fi
The fastest way to update Node.js on your Mac - DEV Community
August 27, 2024 - Now, let’s explore the simplest and fastest method to accomplish this on your macOS! Type this command in terminal to check your Node.js version: ... If you haven’t installed the n package yet, use npm to install it. ... After installing the n package, you can proceed to update your Node.js to the desired version.
Top answer
1 of 3
2

Is /usr/local/bin/npm a broken symlink? That would make sudo npm print an error like command not found and npm print an error like No such file or directory.

You could try creating a new symlink for node:

$ rm /usr/local/bin/npm; brew unlink node; brew link node
Unlinking /usr/local/Cellar/node/0.10.5... 4 links removed
Linking /usr/local/Cellar/node/0.10.5... 5 symlinks created
$ sudo /usr/local/bin/npm uninstall npm -g

Or use /usr/local/opt/node/bin/npm:

$ ls -l `brew --prefix node`
lrwxr-xr-x  1 lauri  admin  21 Jun 14 18:27 /usr/local/opt/node -> ../Cellar/node/0.10.5
$ sudo /usr/local/opt/node/bin/npm uninstall npm -g
2 of 3
0

I realize this is years old, but after dealing with these sorts of file permission and package manager problems myself for many years, a buddy of mine and I created a rather simple solution that works without sudo, and without relying on brew or other package managers.

Install with webi

On Mac or Linux:

curl -s https://webinstall.dev/node@stable | bash

Or, on Windows 10 (which now includes curl.exe - so no msysgit or cygwin needed):

curl.exe -sA "MS" https://webinstall.dev/node@stable | powershell

More info at https://webinstall.dev/node (also has a link to the source for the bash and powershell)

Upgrade / Switch Versions

And then you can switch versions (upgrade, downgrade, etc) like this:

webi node     # 'stable' is the default tag
webi node@lts # long-term support
webi node@v10 # specifically the latest of v10

Doing the same by hand

webi is just a small helper / bootstrap script in bash (or powershell on Windows 10), and you could do the same by hand:

  • Check the node.js releases API: https://nodejs.org/dist/index.tab
  • Get the desired version: https://nodejs.org/dist/latest/
  • Unpack to $HOME/.local/opt/node
  • Add $HOME/.local/opt/node/bin to your PATH
    • (in .zshrc, .bashrc, .profile, the Windows Registry, or with pathman)
  • On macOS 10.14+ you may need to use
    • xattr -r -d com.apple.quarantine ~/.local/opt/node/bin/node

Then when you need to update versions, remove the node directory (rm -rf ~/.local/opt/node) and then repeat the above steps with the new version.

Note: This requires re-installing any global tools, such as jshint or prettier.

🌐
Ropstam
ropstam.com › home › blogs › how to update node.js version [mac, windows, & linux]
How to Update Node.js Version [Mac, Windows, & Linux] - Ropstam Solutions Inc.
May 13, 2024 - To stay up-to-date with the latest advancements introduced in the Node.js framework, it is important to update the Node.js version. This article covered the question of how to update the node.js version on various platforms. Commands needed for updating the node.js development kit across platforms such as Windows, Ubuntu, Linux, and Mac have been thoroughly explained to guide the readers.
🌐
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 - A manual update involves downloading the installer from the official website and updating the app using the installation wizard. A manual update gives you direct control over the process. ... 1. Navigate to the official Node.js website and download ...
🌐
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.
🌐
Bacancy Technology
bacancytechnology.com › qanda › node › upgrade-node-js-version-on-mac
How to Safely Upgrade Node.js Version on Mac
July 7, 2025 - Avoid errors and maintain stability while upgrading Node.js on macOS. Follow this no-risk guide to upgrade Node.js version on Mac.