We will discuss installing Node from the default Debian repository
Installing the Official Debian Node.js Package
Debian contains a version of Node.js in its default repositories. At the time of writing, this version is 10.15.2, which will reach end-of-life on April 1, 2021. At this date it will no longer be supported with security and bug fixes. If you would like to experiment with Node using an easy-to-install, stable, and long-term option, then installing from the Debian repo may make sense.
To get Node.js from the default Debian software repository, you can use the
apt package manager. First, refresh your local package index:
$ sudo apt update
Then install the Node.js package, and
npm the Node Package Manager:
$ sudo apt install nodejs npm
To verify that the install was successful, run the
node command with the
-v flag to get the version:
[email protected]:/ $ node -v v10.21.0
$ npm -v
[email protected]:/ $ npm -v 5.8.0
You can uninstall Node.js using
nvm, depending on the version you want to target. To remove versions installed from the Debian repository or from the PPA, you will need to work with the
apt utility at the system level.
To remove either of these versions, type the following:
$ sudo apt remove nodejs
This command will remove the package and the configuration files.
- How To Add a User to Sudoers On Debian 10 Buster
- How to install zabbix 5.2 on debian 10
- How to install Unifi Controller on Debian 10 (Buster)
- how to upgrade proxmox mail gateway from 5.x to 6
- how to use VestaCP with Node.JS support.