On Ubuntu 16.04, I mistakenly used root to install nvm, and then to install node.js 8.8.1 via nvm. I also used nvm alias default 8.8.1, thinking it would correct my
nvm alias default 8.8.1
You can uninstall the nodejs by using the following command.
yum remove nodejs
However, this will not remove the nvm from your linux box. To remove that try the below command.
nvm unload