How To Install opt on Debian 9

In this tutorial we learn how to install opt on Debian 9. opt is Options Parsing Tool library

Introduction

In this tutorial we learn how to install opt on Debian 9.

What is opt

opt is:

opt is a subroutine library which facilitates the convenient input of parameters to a C program. Parameters are parsed from a command line, with further facilities for reading options from files, from environment strings, or from an interactive environment. The aim of the opt package is to permit programs to be both user- and programmer- friendly. The package attempts to on the one hand provide a direct and relatively full-featured input interface to the ultimate user of the program, and at the same time impose a minimal amount of work on the programmer to “attach” the package to his or her software. It is similar to GNU’s (and AT&T’s old) getopts package, but with a different interface that might be easier to use.

There are three methods to install opt on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install opt Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install opt using apt-get by running the following command:

sudo apt-get -y install opt

Install opt Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install opt using apt by running the following command:

sudo apt -y install opt

Install opt 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install opt using aptitude by running the following command:

sudo aptitude -y install opt

How To Uninstall opt on Debian 9

To uninstall only the opt package we can use the following command:

sudo apt-get remove opt

Uninstall opt And Its Dependencies

To uninstall opt and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove opt

Remove opt Configurations and Data

To remove opt configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge opt

Remove opt configuration, data, and all of its dependencies

We can use the following command to remove opt configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge opt

Dependencies

opt have the following dependencies:

References

Summary

In this tutorial we learn how to install opt package on Debian 9 using different package management tools: apt, apt-get and aptitude.