How To Install libgetopt-argvfile-perl on Ubuntu 18.04

In this tutorial we learn how to install libgetopt-argvfile-perl on Ubuntu 18.04. libgetopt-argvfile-perl is Perl module for reading script options and parameters from files

Introduction

In this tutorial we learn how to install libgetopt-argvfile-perl on Ubuntu 18.04.

What is libgetopt-argvfile-perl

libgetopt-argvfile-perl is:

This module simply interpolates option file hints in @ARGV by the contents of the pointed files. This enables option reading from files instead of or additional to the usual reading from the command line.

Alternatively, you can process any array instead of @ARGV which is used by default and mentioned mostly in this manual.

The interpolated @ARGV could be subsequently processed by the usual option handling, e.g. by a Getopt::xxx module. Getopt::ArgvFile does not perform any option handling itself, it only prepares the array @ARGV.

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

sudo apt-get -y install libgetopt-argvfile-perl

Install libgetopt-argvfile-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libgetopt-argvfile-perl

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

sudo aptitude -y install libgetopt-argvfile-perl

How To Uninstall libgetopt-argvfile-perl on Ubuntu 18.04

To uninstall only the libgetopt-argvfile-perl package we can use the following command:

sudo apt-get remove libgetopt-argvfile-perl

Uninstall libgetopt-argvfile-perl And Its Dependencies

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

sudo apt-get -y autoremove libgetopt-argvfile-perl

Remove libgetopt-argvfile-perl Configurations and Data

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

sudo apt-get -y purge libgetopt-argvfile-perl

Remove libgetopt-argvfile-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libgetopt-argvfile-perl

References

Summary

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