×

This article covers how to install nodejs and npm on your Debian system with different methods. Also, you will learn how to uninstall npm from your Debian system. 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.


To Install the Official Debian Node.js Package:

1. 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

2. Then install the Node.js package, and npm the Node Package Manager:

$ sudo apt install nodejs npm

3. To verify that the install was successful, run the node command with the -v flag to get the version:

$ node -v


To Remove Node.js:

1. To remove either of these versions, type the following:

$ sudo apt remove nodejs

2. To uninstall a version of Node.js that you have enabled using nvm, first determine whether or not the version you would like to remove is the current active version:

$ nvm current

3. If the version you are targeting is not the current active version, you can run:

$ nvm uninstall node_version

This command will uninstall the selected version of Node.js.

4. If the version you would like to remove is the current active version, you must first deactivate nvm to enable your changes:

$ nvm deactivate



This article covers the method of using ReactJS on a Ubuntu 20.04 system by installing NodeJS and required dependencies on it. 

Finally, we demonstrated to you the usage of ReactJS by creating a sample application.


To install npm on Ubuntu Linux, login into your server as a sudo user and invoke the command below:

$ sudo apt install npm

Once the installation is complete, you can verify the version of npm installed using the command:

$ npm --version


To install the tool, run the following npm command:

$ sudo npm -g install create-react-app


Once installed, you can confirm the version of installed by running:

$ create-react-app --version


How to Install ReactJS on Ubuntu 20.04? 

React or Reacts is a front-end JavaScript library that is used to develop UI components. It is managed by Facebook and open-source developers.

It makes it effortless to create and maintain interactive UI specifically for single-page applications. 

Many developers are using it because of its flexibility, integrity, and its feature to bring Html directly into JS. 

Many well-known corporations such as Facebook, Uber, and Instagram used the ReactJS framework to create interfaces.


To install npm, open up the terminal and type the following command:

$ sudo apt install npm


To verify if the installation is completed successfully, check the npm version through the command:

$ npm --version



This article covers how to install Yarn on Ubuntu 20.04 LTS system. Yarn is a JavaScript package manager compatible with npm that helps you automate the process of installing, updating, configuring, and removing npm packages. 

It caches every download package and speeds up the installation process by parallelizing operations.


To Yarn on Ubuntu Linux:

1. Import the repository’s GPG key and add the Yarn APT repository to your system by running the following commands:

$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

2. Once the repository is enabled, update the package list, and install Yarn:

$ sudo apt update
$ sudo apt install yarn

3. If you installed Node trough nvm, skip the Node.js installation with:

$ sudo apt install --no-install-recommends yarn

4. Once completed, verify the installation by printing the Yarn version:

$ yarn --version




More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com