How to install a specific version of Node on Ubuntu/Debian?

The n module worked for me.

Run this code to clear npm’s cache, install n, and install the latest stable version of Node:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

See: http://www.hostingadvice.com/how-to/update-node-js-latest-version/
And: https://www.npmjs.com/package/n

To install a specific version of node:

sudo n 18.17.1

To check what version:

node -v

You might need to restart

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)