How To Install libweb-query-perl on Debian 12

Learn how to install libweb-query-perl on Debian 12 with this tutorial. libweb-query-perl is perl web scraping library like jQuery

Introduction

In this tutorial we learn how to install libweb-query-perl on Debian 12.

What is libweb-query-perl

libweb-query-perl is:

Web::Query is a yet another web scraping framework, with a jQuery like interface.

Web::Query built at top of the CPAN modules HTML::TreeBuilder::XPath, LWP::UserAgent, and HTML::Selector::XPath.

Web::Query uses HTML::Selector::XPath and only supports the CSS 3 selector supported by that module. It doesn’t support jQuery’s extended queries (yet?). If a selector is passed as a scalar ref, it’ll be taken as a straight XPath expression.

There are three methods to install libweb-query-perl on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libweb-query-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 libweb-query-perl using apt-get by running the following command:

sudo apt-get -y install libweb-query-perl

Install libweb-query-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libweb-query-perl using apt by running the following command:

sudo apt -y install libweb-query-perl

Install libweb-query-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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libweb-query-perl using aptitude by running the following command:

sudo aptitude -y install libweb-query-perl

How To Uninstall libweb-query-perl on Debian 12

To uninstall only the libweb-query-perl package we can use the following command:

sudo apt-get remove libweb-query-perl

Uninstall libweb-query-perl And Its Dependencies

To uninstall libweb-query-perl and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove libweb-query-perl

Remove libweb-query-perl Configurations and Data

To remove libweb-query-perl configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge libweb-query-perl

Remove libweb-query-perl configuration, data, and all of its dependencies

We can use the following command to remove libweb-query-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libweb-query-perl

Dependencies

libweb-query-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libweb-query-perl package on Debian 12 using different package management tools: apt, apt-get and aptitude.