How to install the previous version of Node and npm? (original) (raw)

Last Updated : 3 Jun, 2026

Node.js is a JavaScript runtime that lets you run JavaScript outside the browser. npm (Node Package Manager) comes bundled with Node.js and lets you install and manage reusable code packages. Each Node.js release ships with a specific default npm version, so the two are always linked.

**Note: npm is commonly referred to as “Node Package Manager” but it is not officially an acronym.

**Steps to Install the Previous Version of NodeJS and NPM

Follow these steps to install a specific Node.js version in windows as well as linux:

**Step 1: Check the installed version of Node and NPM on the computer use the following command respectively

node --version
npm --version

Screenshot

**Step 2: For installing the previous version of Node use the following command:

Windows

npm install -g node@version

Linux

sudo apt-get install nodejs=version-1chl1~precise1

**Example:

npm install -g node@10.9.0
sudo apt-get install nodejs=10.9.0-1chl1~precise1

**Step 3: To install previous version of NPM use the following command:

Windows

npm install -g npm@version

Linux

sudo apt-get install npm=version-1chl1~precise1

**Example:

npm install -g npm@4.0.0
sudo apt-get install npm=4.0.0-1chl1~precise1

Use Cases of Previous Node & npm versions