I want to uninstall nodejs and npm from my Ubuntu 18.04 system.
I have tried the following command.
sudo apt purge nodejs
Output
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'nodejs' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 123 not upgraded.
P.S.
which node outputs /usr/bin/node
How can I uninstall nodejs and npm?
Related
im trying to install NodeJS LTS on my vm. But ubuntu (22.04) throws an error
Error:
root#web-server ~/server# sudo apt list nodejs
Listing... Done
nodejs/unknown 18.12.0-deb-1nodesource1 arm64
N: There is 1 additional version. Please use the '-a' switch to see it
root#web-server ~/server# sudo apt install nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
javascript-common libc-ares2 libjs-highlight.js libnode72
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 93 not upgraded.
Need to get 0 B/27.8 MB of archives.
After this operation, 180 MB of additional disk space will be used.
(Reading database ... 83553 files and directories currently installed.)
Preparing to unpack .../nodejs_18.12.0-deb-1nodesource1_arm64.deb ...
Unpacking nodejs (18.12.0-deb-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_18.12.0-deb-1nodesource1_arm64.deb (--unpack):
trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in package libnode72:arm64 12.22.9~dfsg-1ubuntu3
Errors were encountered while processing:
/var/cache/apt/archives/nodejs_18.12.0-deb-1nodesource1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root#web-server ~/server [100]#
I tried to delete and install it again multiple times bu nothing happens
Follow this link: Github Error solved link
and reinstall nodejs with the following command as given below
Installed Nodejs version-12.22.9 Successfully on my Ubuntu 22.04
sudo apt update
sudo apt install nodejs
Press Y when prompted to confirm installation. If you are prompted to restart any services, press ENTER to accept the defaults and continue. Check that the install was successful by querying node for its version number:
node -v
Output
v 12.22.9
Try this:
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ source ~/.bashrc
$ nvm list-remote
$ nvm install v16.14.0
$ nvm install lts/fermium
$ node -v
These steps will install nodejs v14.19.0.
There is a very helpful link to setup or update nodejs on Ubuntu 22.4
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04
you can visit it for more details.
I want to fully delete the nodejs and npm from my Ubuntu device.
I ran these commands but still nodejs and npm in my device.
sudo apt-get remove nodejs
sudo apt-get remove npm
The output in terminal:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'nodejs' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 95 not upgraded.
So, after that when I open the terminal to check the version of the node and npm, I ran these commands:
>>> node -v
>>> npm -v
and still print to me the version of it, which is:
node: v10.15.2
npm: 6.4.1
What is the problem here, is my command wrong?
installed node.js already but shows
Command nodejs not found, but can be installed with:
sudo apt install nodejs
then tried, sudo apt install nodejs
and shows
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (14.13.1-deb-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
but when I try to check node.js version, $ nodejs -v
it shows, Command nodejs not found, but can be installed with:
sudo apt install nodejs
Please help me to solve this error and properly see node.js version
The nodejs executable is called node, please run node --version to see if your installation works.
I moved from windows to ubuntu and following the instruction as per the site - https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Following comand ran successfully
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
Then
sudo apt-get install -y nodejs
The output of the above command is :
$sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (4.2.6~dfsg-1ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 519 not upgraded.
As you can see its taking nodejs of version 4 , although I trying to install 8+
I removed the nodejs with
sudo apt-get remove nodejs
but still on trying again it says the same thing.
Please note that the setup is new and there was nothing installed previously
I am not sure but I wanted 'node', why its trying to install nodejs
If I try to do this -
$ sudo apt-get install node
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package node is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'node' has no installation candidate
Hey I use Ubuntu 16 the latest LTS
What you can do, is install ubuntu-make
Then run
umake nodejs
It installs the latest version available (v8.2.1)
Or, you can also use nvm
The detailed instructions are here
Note If you use ubuntu-make , you may have to log out and log in
Then check your version via node -v
Once you have version 4, you can update it to the latest. See this topic Upgrading Node.js to latest version
I have a cloud computer which I can access through SSH. I login to my cloud pc as root.
I installed VLC media player application with apt-get command some time, however when I write "vlc" to the terminal I have the following output:
root#fercis:~# vlc
The program 'vlc' is currently not installed. You can install it by typing:
apt-get install vlc-nox
When I write "apt-get install vlc-nox" or "apt-get install vlc", the computer prints that I already have vlc installed:
root#fercis:~# apt-get install vlc-nox
Reading package lists... Done
Building dependency tree
Reading state information... Done
vlc-nox is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-23-generic linux-headers-3.2.0-23 icedtea-netx
icedtea-netx-common
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 167 not upgraded.
root#fercis:~# apt-get install vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
vlc is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-23-generic linux-headers-3.2.0-23 icedtea-netx
icedtea-netx-common
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 167 not upgraded.
Is there a problem in using VLC player as root in Ubuntu?
Type cvlc, or use vlc on a non root account. You could also use vlc-wrapper, from an account that is sudoed.