Coder Perfect

How can I uninstall or upgrade my outdated version of Node.js?


I installed node.js on my Ubuntu system some time ago. with the following steps (history dump):

309  git clone git://
310  cd node/
311  ./configure 
312  make
313  ls -l
314  node
315  sudo make install

v0.3.2-pre is the version I’m using.

Is there a clean way to receive a new version without having to remove, reinstall, or upgrade? I’m not too familiar with make or git.


Asked by koalabruder

Solution #1

A node version manager is n. It takes care of everything for you. It either instals and switches to the version you choose, or it just switches if you already have it.

Note: Don’t use sudo if you’re having problems installing anything because of permissions. Once you’ve run this command, your user account will be the owner of the /usr/local/ directory, allowing you to run normal tasks without the need for sudo. It’s a more reasonable option.

sudo chown -R $USER /usr/local

Answered by generalhenry

Solution #2

Rep the procedure exactly as before. The new binary will be overwritten by the old.

The final step replaces what’s already there with what you’ve just created.

Answered by Dan Grossman

Solution #3

The most recent stable “LTS” version of node is 12.18.4 (2020-10-03), which can be found at

curl -o- | bash

Once you’ve installed NVM, you can use the nvm command to install a specific version of Node.js:

nvm install v12.18.4

Note that the nvm command may not be available until you close and reopen your terminal window.

In your terminal, you should expect to see something similar to this:

Now using node v12.18.4

Yes, it’s that simple, and it doesn’t even require sudo! Please vote this up (so that others don’t have to sudo-install things!) and have a great day coding in Node.js!

According to the node mailing list, the best approach to handle your nodejs versioning/upgrading is to use NVM (Node Version Manager). nvm-sh/nvm

Because the verbose commands make it much easier to keep track of what you’re doing in your Terminal/SSH Log, NVM is deemed “better” than N. It’s also faster, doesn’t require sudo, and is used by the team at NPM the node. Experts in JavaScript security!

Answered by nelsonic

Solution #4

On Ubuntu 12.04, this worked well for me:

add-apt-repository ppa:richarvey/nodejs
apt-get update
apt-get install nodejs npm

There’s no need to construct anything. This will be accomplished through the package manager.

Answered by odedfos

Solution #5

Nodist is the most user-friendly Node version manager for Windows.

nmvw, which requires Python 2.7 and git, is another option; I haven’t tried it.

Answered by iono

Post is based on