The package name of Evented I/O for V8 javascript is nodejs. To remove nodejs and npm:
sudo apt-get purge nodejs npm
'node' is a purely virtual package. That's why you got the error message: Package 'node' is not installed, so not removed
For a brief description of what these packages do without making any changes to your system:
apt-cache show nodejs npm
To show whether nodejs and npm are installed and up-to-date without making any changes to your system:
apt-cache policy nodejs npm
Answer from karel on askubuntu.comThe package name of Evented I/O for V8 javascript is nodejs. To remove nodejs and npm:
sudo apt-get purge nodejs npm
'node' is a purely virtual package. That's why you got the error message: Package 'node' is not installed, so not removed
For a brief description of what these packages do without making any changes to your system:
apt-cache show nodejs npm
To show whether nodejs and npm are installed and up-to-date without making any changes to your system:
apt-cache policy nodejs npm
To remove nodejs and npm:
sudo apt-get purge nodejs
Please note this only removes node related packages i.e. relevant packages, nothing else.
On the other hand, when you do:
sudo apt-get purge --auto-remove nodejs
You combine following two commands as one:
sudo apt-get purge nodejs
sudo apt-get autoremove
So the removal of both gyp, linux-headers-4.4.0-18-generic and dependant packages are autoremoved, as they were install dependencies and are no longer needed. Presumably because the main package has already been removed.
So it is perfectly fine in this context to run:
sudo apt-get purge --auto-remove nodejs
If you are paranoid, you can do this in two steps: first purge nodejs:
sudo apt-get purge nodejs
and then remove any orphaned dependencies (if any):
sudo apt-get autoremove
I had the same issue with npm.
I suggest you install aptitude which can help you resolve conflicts
sudo apt install aptitude
then install your package with aptitude
sudo aptitude install npm
I had the same issue with npm and had to install the following packages in order:
sudo apt install libssl1.0-dev
sudo apt install nodejs-dev
sudo apt install node-gyp
sudo apt install npm
Hope this helps
Try apt-get updateto update the list.
Try
This will install node version manager (nvm) by typing the following at the command line.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
Then activate nvm by typing the following at the command line.
. ~/.nvm/nvm.sh
Then Use nvm to install the version of Node.js you intend to use by typing the following at the command line.
nvm install 4.4.5 (you can install 6.1.0 LTS for instance)
then test it by typing
node -e "console.log('Running Node.js ' + process.version)"
Use the NodeJS guide for installing the 10.x repo. These instructions are roughly copied here below:
Node.js is available from the NodeSource Debian and Ubuntu binary distributions repository (formerly Chris Lea's Launchpad PPA). Support for this repository, along with its scripts, can be found on GitHub at nodesource/distributions.
NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 6.x on older distros.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejsAlternatively, for Node.js 10:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install -y nodejsOptional: install build tools
To compile and install native addons from npm you may also need to install build tools:
sudo apt-get install -y build-essentialAvailable architectures:
- i386 (32-bit)
- amd64 (64-bit)
- armhf (ARM 32-bit hard-float, ARMv7 and up: arm-linux-gnueabihf)
Supported Ubuntu versions:
- Ubuntu 14.04 LTS (Trusty Tahr)
- Ubuntu 16.04 LTS (Xenial Xerus)
It's simple. I have faced the same problem but solved it. No need to use terminal. Just go to the Ubuntu software store which is usually called snap package store, search nodejs and install it. In this package store, you will find the latest version of nodejs. If you use terminal, then it may install older version of nodejs. I hope it will work. HAPPPY CODING