How To Install libtext-csv-perl on Ubuntu 20.04

In this tutorial we learn how to install libtext-csv-perl on Ubuntu 20.04. libtext-csv-perl is comma-separated values manipulator (using XS or PurePerl)

Introduction

In this tutorial we learn how to install libtext-csv-perl on Ubuntu 20.04.

What is libtext-csv-perl

libtext-csv-perl is:

Text::CSV provides facilities for the composition and decomposition of files containing comma-separated value records. An instance of the Text::CSV class can combine fields into a CSV string and parse a CSV string into fields.

The module accepts either strings or files as input and can utilize any user-specified characters as delimiters, separators, and escapes so it is perhaps better called ASV (anything separated values) rather than just CSV.

This module will automatically select the best available implementation of the algorithm, whether the Pure Perl version present in this package, or the C/XS implementation, available in libtext-csv-xs-perl.

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

sudo apt-get -y install libtext-csv-perl

Install libtext-csv-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libtext-csv-perl

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

sudo aptitude -y install libtext-csv-perl

How To Uninstall libtext-csv-perl on Ubuntu 20.04

To uninstall only the libtext-csv-perl package we can use the following command:

sudo apt-get remove libtext-csv-perl

Uninstall libtext-csv-perl And Its Dependencies

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

sudo apt-get -y autoremove libtext-csv-perl

Remove libtext-csv-perl Configurations and Data

To remove libtext-csv-perl configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge libtext-csv-perl

Remove libtext-csv-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libtext-csv-perl

References

Summary

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