How To Install liblocale-subcountry-perl on Ubuntu 18.04

In this tutorial we learn how to install liblocale-subcountry-perl on Ubuntu 18.04. liblocale-subcountry-perl is module for converting state/province names to/from code

Introduction

In this tutorial we learn how to install liblocale-subcountry-perl on Ubuntu 18.04.

What is liblocale-subcountry-perl

liblocale-subcountry-perl is:

Locale::SubCountry is a collection of Perl modules for converting the full name for a countries’ administrative region to the code commonly used for postal addressing and vice versa. The codes are defined in ISO 3166-2:1998, “Codes for the representation of names of countries and their subdivisions.”

Subcountry regions are defined as states in the US and Australia, provinces in Canada and counties in the UK. The names and codes for all subcountry regions in a country can be returned either as a hash or array.

There are three methods to install liblocale-subcountry-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 liblocale-subcountry-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 liblocale-subcountry-perl using apt-get by running the following command:

sudo apt-get -y install liblocale-subcountry-perl

Install liblocale-subcountry-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install liblocale-subcountry-perl

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

sudo aptitude -y install liblocale-subcountry-perl

How To Uninstall liblocale-subcountry-perl on Ubuntu 18.04

To uninstall only the liblocale-subcountry-perl package we can use the following command:

sudo apt-get remove liblocale-subcountry-perl

Uninstall liblocale-subcountry-perl And Its Dependencies

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

sudo apt-get -y autoremove liblocale-subcountry-perl

Remove liblocale-subcountry-perl Configurations and Data

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

sudo apt-get -y purge liblocale-subcountry-perl

Remove liblocale-subcountry-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge liblocale-subcountry-perl

References

Summary

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