How To Install libhtml-tree-perl on Ubuntu 22.04
Introduction
In this tutorial we learn how to install libhtml-tree-perl on Ubuntu 22.04.
What is libhtml-tree-perl
libhtml-tree-perl is:
HTML::Tree is a collection of modules that represent, create and extract information from HTML syntax trees. These modules used to be part of the libwww-perl distribution, but are now unbundled in order to facilitate a separate development track.
There are three methods to install libhtml-tree-perl 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 libhtml-tree-perl Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install libhtml-tree-perl using apt-get by running the following command:
sudo apt-get -y install libhtml-tree-perl
Install libhtml-tree-perl Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install libhtml-tree-perl using apt by running the following command:
sudo apt -y install libhtml-tree-perl
Install libhtml-tree-perl 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 libhtml-tree-perl using aptitude by running the following command:
sudo aptitude -y install libhtml-tree-perl
How To Uninstall libhtml-tree-perl on Ubuntu 22.04
To uninstall only the libhtml-tree-perl package we can use the following command:
sudo apt-get remove libhtml-tree-perl
Uninstall libhtml-tree-perl And Its Dependencies
To uninstall libhtml-tree-perl and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove libhtml-tree-perl
Remove libhtml-tree-perl Configurations and Data
To remove libhtml-tree-perl configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge libhtml-tree-perl
Remove libhtml-tree-perl configuration, data, and all of its dependencies
We can use the following command to remove libhtml-tree-perl configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libhtml-tree-perl
References
Summary
In this tutorial we learn how to install libhtml-tree-perl package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.