To install specific version of Node JS, first make sure NPM package manager is installed.
$ sudo apt-get install npm o
$ sudo npm install n -g
You can check what is your current Node JS version using below command,
$ node -v
Also check which all node versions are supported by using below command,
$ n ls
Changing to specific node version as you want.
Now, lets say if you have seen latest node version is 9.4.0 and want to install “6.8.1” version, which is actually a downgrading of Node JS version then you can use below command and pass the version number to “n” command as,
$ sudo n 6.8.1
Now, you can see version 6.8.1 is installed,
$ node -v
Thanks!!! This is the only one that has worked so far