0

I need to install nodejs version8.11.2 into my ubuntu machine. my ubuntu versions is 18.04.

In my machine installed node version is 10.0. Although I use 'sudo apt-get remove nodejs' command to uninstall nodeJS, it is not removing. When i run node -v, it gives the same version.enter image description here enter image description here

  • 1
    Possible duplicate of [How to change to an older version of Node.js](https://stackoverflow.com/questions/7718313/how-to-change-to-an-older-version-of-node-js) – Oliver Nybo Jun 21 '19 at 09:38

1 Answers1

0

Install Node.js from the NodeSource repository

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

The command above :

  1. Adds the NodeSource signing key to your system.
  2. Creates an apt sources repository file.
  3. Installs all necessary packages.
  4. Refreshes the apt cache.

Then you can do : sudo apt install nodejs


At the time of writing this 12.4.2 is the current latest Node.js version. You can install version 10.16.0 by changing setup_12.x to setup_10.x in the first command.

Community
  • 1
  • 1
EMX
  • 6,066
  • 1
  • 25
  • 32