How To Install libcommons-cli-java on Debian 10

Learn how to install libcommons-cli-java on Debian 10 with this tutorial. libcommons-cli-java is Command line arguments and options parsing library

Introduction

In this tutorial we learn how to install libcommons-cli-java on Debian 10.

What is libcommons-cli-java

libcommons-cli-java is:

The Apache Commons CLI library provides an API for parsing command line options passed to programs. It’s also able to print help messages detailing the options available for a command line tool.

Commons CLI supports different types of options:

  • POSIX like options (ie. tar -zxvf foo.tar.gz)
  • GNU like long options (ie. du –human-readable –max-depth=1)
  • Java like properties (ie. java -Djava.awt.headless=true Foo)
  • Short options with value attached (ie. gcc -O2 foo.c)
  • long options with single hyphen (ie. ant -projecthelp)

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

Install libcommons-cli-java Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install libcommons-cli-java

Install libcommons-cli-java Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libcommons-cli-java using apt by running the following command:

sudo apt -y install libcommons-cli-java

Install libcommons-cli-java 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 libcommons-cli-java using aptitude by running the following command:

sudo aptitude -y install libcommons-cli-java

How To Uninstall libcommons-cli-java on Debian 10

To uninstall only the libcommons-cli-java package we can use the following command:

sudo apt-get remove libcommons-cli-java

Uninstall libcommons-cli-java And Its Dependencies

To uninstall libcommons-cli-java and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove libcommons-cli-java

Remove libcommons-cli-java Configurations and Data

To remove libcommons-cli-java configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libcommons-cli-java

Remove libcommons-cli-java configuration, data, and all of its dependencies

We can use the following command to remove libcommons-cli-java configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libcommons-cli-java

Dependencies

libcommons-cli-java have the following dependencies:

References

Summary

In this tutorial we learn how to install libcommons-cli-java package on Debian 10 using different package management tools: apt, apt-get and aptitude.