How To Install libdatetime-format-db2-perl on Ubuntu 20.04

In this tutorial we learn how to install libdatetime-format-db2-perl on Ubuntu 20.04. libdatetime-format-db2-perl is Parse and format DB2 dates and times

Introduction

In this tutorial we learn how to install libdatetime-format-db2-perl on Ubuntu 20.04.

What is libdatetime-format-db2-perl

libdatetime-format-db2-perl is:

DateTime::Format::DB2 understands the formats used by DB2 for its DATE, TIME, and TIMESTAMP data types. It can be used to parse these formats in order to create DateTime objects, and it can take a DateTime object and produce a string representing it in the DB2 format.

There are three methods to install libdatetime-format-db2-perl on Ubuntu 20.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 libdatetime-format-db2-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 libdatetime-format-db2-perl using apt-get by running the following command:

sudo apt-get -y install libdatetime-format-db2-perl

Install libdatetime-format-db2-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libdatetime-format-db2-perl using apt by running the following command:

sudo apt -y install libdatetime-format-db2-perl

Install libdatetime-format-db2-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 libdatetime-format-db2-perl using aptitude by running the following command:

sudo aptitude -y install libdatetime-format-db2-perl

How To Uninstall libdatetime-format-db2-perl on Ubuntu 20.04

To uninstall only the libdatetime-format-db2-perl package we can use the following command:

sudo apt-get remove libdatetime-format-db2-perl

Uninstall libdatetime-format-db2-perl And Its Dependencies

To uninstall libdatetime-format-db2-perl and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove libdatetime-format-db2-perl

Remove libdatetime-format-db2-perl Configurations and Data

To remove libdatetime-format-db2-perl configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge libdatetime-format-db2-perl

Remove libdatetime-format-db2-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libdatetime-format-db2-perl

References

Summary

In this tutorial we learn how to install libdatetime-format-db2-perl package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.