How To Install libconvert-units-perl on Ubuntu 18.04

In this tutorial we learn how to install libconvert-units-perl on Ubuntu 18.04. libconvert-units-perl is Perl module for performing unit conversions

Introduction

In this tutorial we learn how to install libconvert-units-perl on Ubuntu 18.04.

What is libconvert-units-perl

libconvert-units-perl is:

The Units package is a collection of modules for parsing strings with unit measurements (such as “12pt” or “3 meters”) and converting them to some other unit (such as “picas” or “inches”).

There are three methods to install libconvert-units-perl on Ubuntu 18.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 libconvert-units-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 libconvert-units-perl using apt-get by running the following command:

sudo apt-get -y install libconvert-units-perl

Install libconvert-units-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libconvert-units-perl

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

sudo aptitude -y install libconvert-units-perl

How To Uninstall libconvert-units-perl on Ubuntu 18.04

To uninstall only the libconvert-units-perl package we can use the following command:

sudo apt-get remove libconvert-units-perl

Uninstall libconvert-units-perl And Its Dependencies

To uninstall libconvert-units-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libconvert-units-perl

Remove libconvert-units-perl Configurations and Data

To remove libconvert-units-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libconvert-units-perl

Remove libconvert-units-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libconvert-units-perl

References

Summary

In this tutorial we learn how to install libconvert-units-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.