How To Install libsort-versions-perl on Debian 10

Learn how to install libsort-versions-perl on Debian 10 with this tutorial. libsort-versions-perl is Perl module for sorting of revision (and similar) numbers

Introduction

In this tutorial we learn how to install libsort-versions-perl on Debian 10.

What is libsort-versions-perl

libsort-versions-perl is:

The Sort::Versions module allows easy sorting (via comparisons) of mixed text and numeric strings, similar to the complex “version numbers” that many revision control packages and shared library systems use. For an explanation of the algorithm, it’s easiest to look at these examples:

1.1 < 1.2 1.1a < 1.2 1.1 < 1.1.1 1.1 < 1.1a 1.1.a < 1.1a 1 < a a < b 1 < 2

(special handling for leading zeros) 0002 < 1 1.06 < 1.5

(a hyphen binds looser than a period) 1-1 < 1-2 1-2 < 1.2

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

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

sudo apt-get -y install libsort-versions-perl

Install libsort-versions-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libsort-versions-perl

Install libsort-versions-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 libsort-versions-perl using aptitude by running the following command:

sudo aptitude -y install libsort-versions-perl

How To Uninstall libsort-versions-perl on Debian 10

To uninstall only the libsort-versions-perl package we can use the following command:

sudo apt-get remove libsort-versions-perl

Uninstall libsort-versions-perl And Its Dependencies

To uninstall libsort-versions-perl and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove libsort-versions-perl

Remove libsort-versions-perl Configurations and Data

To remove libsort-versions-perl configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libsort-versions-perl

Remove libsort-versions-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libsort-versions-perl

Dependencies

libsort-versions-perl have the following dependencies:

References

Summary

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