I tried these two commands to uninstall node js but I am not able to do it.
sudo apt-get purge nodejs
sudo apt-get autoremove
when I check for version, it shows
v9.3.0
And I want to install node 8.x
I got the same problem.
Step 1: Find the node location using
rails#rails-All-Series:~$ whereis node
node: /usr/local/bin/node
Step2: Remove node module from these the location.
rails#rails-All-Series:/usr/local/bin$sudo rm -rf node
Below mentioned link specifies how to delete node package from ubuntu
sudo apt-get purge nodejs
it will only be purging related nodejs packages
Other Alternative will be:
sudo apt-get purge --auto-remove nodejs
it will be implementing the below mentioned commands internally:
sudo apt-get purge nodejs
sudo apt-get autoremove
autoremove will actually be removing the related package and they were installed as a dependency module .
Related
At first I installed the node with terminal, with command
Update Package Manager
sudo apt-get update
Adding NodeJS PPAs
sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
Installing NodeJS and NPM
sudo apt-get install nodejs
It works, but when I am looking version node, I see node v 4
Then I used google for search this problem and a found this topic
https://stackoverflow.com/a/43914369
There using a ln command for create symbolic link between two files
and used this instruction for manual install, but nothing happens, error appears and not installing
Look at this screenshot
Maybe I doing anything wrong?
I tend to avoid using my operating system's package manager to install node. The easiest way to install node is Node Version Manager.
Yeah! The solutions found in official site
Of course link Install node version 6
Can you please check:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
but for this you need curl to be installed.
sudo apt-get update
To install curl: sudo apt-get install curl
Here's the link for this.
To upgrade node to latest version: https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version#480642
node -v and nodejs -v shows different versions
My node -v shows
4.2 version
and nodejs -v
shows 6.10.3
So what should be the issue?
I want node -v to show 6.10.3.
I also had the same problem, and I solved this by doing the following steps.
Step 1: completely remove node and node js from system
sudo apt-get remove nodejs sudo apt-get remove npm
Then go to /etc/apt/sources.list.d and remove any node list if you have. Then update system cache by running
sudo apt-get update
Step2: Installing Specific version of node (I am using node version 8)
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt install nodejs
Now If you see node -v and nodejs -v, you get both the versions are same as
v8.14.0
i also face this problem
i tried this
1) sudo apt-get remove nodejs sudo apt-get remove npm
remove cache from /etc/apt/sources.list.d
2)sudo apt-get update
then install again nodejs
3)sudo apt install nodejs
I think you have installed both nodejs and nodejs-legacy packages. So just remove one of them. nodejs-legacy is v.4.x and nodejs is v.6.x
apt-get remove nodejs-legacy
If it says there is no "nodejs-legacy" try
sudo apt-get remove nodejs
And you will see it in the list when it asks you if you are sure about uninstalling.
I'm trying to compile some front end code on my Ubuntu 16.04 web server that was written on Windows. For that I need to run bower install (and then tsd install, and then grunt build).
But I can't get bower to install. Here's what I did, as per this guide (for Ubuntu 14.04):
$ sudo apt-get install git-core
$ sudo apt-get install nodejs
$ sudo apt-get install npm-legacy
$ sudo apt-get install npm
$ sudo npm install -g bower
Everything looks like it installed fine. (No errors.) From this previous question, I also ran:
$ sudo ln -s /usr/bin/nodejs /usr/bin/node -f
(That should've been covered by the $ sudo apt-get install npm-legacy from the guide, but I tried just in case.)
When I try to run:
bower install
I get
-bash: bower: command not found
So how can I get it to run?
Use this:
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
then:
sudo npm install -g bower
Optional:
sudo npm install -g gulp
Ubuntu 16.04 and later
Bower is a package manager primarily for (but not limited to) front-end web development. In Ubuntu 16.04 and later Bower package manager can be quickly and easily installed from the Ubuntu Software app. Open Ubuntu Software, search for "bower" and click the Install button to install it. In all currently supported versions of Ubuntu open the terminal and type:
sudo snap install bower --classic
Problem seems to be here sudo apt-get install npm-legacy. Its kind of typo. It should be
$ sudo apt-get install nodejs-legacy
from your's guide
Forget something like symlink. (ln -s /usr/bin/nodejs /usr/bin/node) Just install nodejs-legacy. This package create a symlink for you.
try installing it via npm(node package manager).
after you have npm installed in your computer, just use
sudo npm i -g bower.
then check version to make sure installation is succeess
bower -v
I'm looking for a recent method to completely uninstall nodejs. Is there any command? Any easy method?
I'm not looking for uninstaller scripts as I want to learn the process.
Using nodejs 0.12 on ubuntu 14.04
You might have installed different kinds of nodejs like me.
try any of this below to remove what you have installed.
// this will remove node
$ sudo apt-get --purge remove node
// this will remove nodejs-legacy
$ sudo apt-get --purge remove nodejs-legacy
// this will remove nodejs
$ sudo apt-get --purge remove nodejs
I didn't know what I have installed because of too many tries. until uninstalling nodejs was a success.
My linux system used to install a old version node.js environment 0.8.14, now updated it to latest node.js through this
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
when update is done and i rebooted the linux system, then I found it is still the old version node.js.
I'm willing to bet you installed the previous version through apt-get without first adding Chris Lea's PPA. The standard Ubuntu repositories have an old version of node.
You'll need to uninstall this old version before you can get the new one:
sudo apt-get --purge remove nodejs # Remove the package itself
sudo apt-get autoremove # Remove any unneeded dependencies
sudo apt-get update
sudo apt-get install nodejs