How To Install node-psl on Ubuntu 22.04
Introduction
In this tutorial we learn how to install node-psl
on Ubuntu 22.04.
What is node-psl
node-psl is:
psl is a JavaScript domain name parser based on the Public Suffix List (https://publicsuffix.org/). This implementation is tested against the test data hosted by Mozilla and kindly provided by Comodo.
The Public Suffix List is a cross-vendor initiative to provide an accurate list of domain name suffixes. A “public suffix” is one under which Internet users can directly register names. Some examples of public suffixes are “.com”, “.co.uk” and “pvt.k12.wy.us”. The Public Suffix List is a list of all known public suffixes.
This package provides the node.js module.
There are three methods to install node-psl
on Ubuntu 22.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install node-psl Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install node-psl
using apt-get
by running the following command:
sudo apt-get -y install node-psl
Install node-psl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install node-psl
using apt
by running the following command:
sudo apt -y install node-psl
Install node-psl Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install node-psl
using aptitude
by running the following command:
sudo aptitude -y install node-psl
How To Uninstall node-psl on Ubuntu 22.04
To uninstall only the node-psl
package we can use the following command:
sudo apt-get remove node-psl
Uninstall node-psl And Its Dependencies
To uninstall node-psl
and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove node-psl
Remove node-psl Configurations and Data
To remove node-psl
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge node-psl
Remove node-psl configuration, data, and all of its dependencies
We can use the following command to remove node-psl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge node-psl
References
Summary
In this tutorial we learn how to install node-psl
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.