How To Install Node.js on Debian 10 buster

5
(2)

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.

97

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

Scroll to Top