Introduction
Node.js is a JavaScript platform for general-purpose programming that allows users to build asynchronous network applications quickly. By leveraging JavaScript on both the front and backend, Node.js can make web application development more consistent and integrated.
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:
Output:
itadmin@dev:/ $ node -v v10.21.0
$ npm -v
itadmin@dev:/ $ npm -v 5.8.0
Removing Node.js
You can uninstall Node.js using apt
or 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.
Similar Posts:
- How to install zabbix 5.2 on debian 10
- How To Add a User to Sudoers On Debian 10 Buster
- how to use VestaCP with Node.JS support.
- How to install Unifi Controller on Debian 10 (Buster)
- how to upgrade proxmox mail gateway from 5.x to 6