How To Install pinentry-gtk2 on Ubuntu 18.04

In this tutorial we learn how to install pinentry-gtk2 on Ubuntu 18.04. pinentry-gtk2 is GTK+-2-based PIN or pass-phrase entry dialog for GnuPG

Introduction

In this tutorial we learn how to install pinentry-gtk2 on Ubuntu 18.04.

What is pinentry-gtk2

pinentry-gtk2 is:

This package contains a program that allows for secure entry of PINs or pass phrases. That means it tries to take care that the entered information is not swapped to disk or temporarily stored anywhere. This functionality is particularly useful for entering pass phrases when using encryption software such as GnuPG or e-mail clients using the same. It uses an open protocol and is therefore not tied to particular software.

The program contained in this package implements a PIN entry dialog using the GTK+ tool kit version 2. If the X Window System is not active then an alternative text-mode dialog will be used. There are sibling packages that implement PIN entry dialogs using other tool kits.

There are three methods to install pinentry-gtk2 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 pinentry-gtk2 Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install pinentry-gtk2

Install pinentry-gtk2 Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install pinentry-gtk2

Install pinentry-gtk2 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 pinentry-gtk2 using aptitude by running the following command:

sudo aptitude -y install pinentry-gtk2

How To Uninstall pinentry-gtk2 on Ubuntu 18.04

To uninstall only the pinentry-gtk2 package we can use the following command:

sudo apt-get remove pinentry-gtk2

Uninstall pinentry-gtk2 And Its Dependencies

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

sudo apt-get -y autoremove pinentry-gtk2

Remove pinentry-gtk2 Configurations and Data

To remove pinentry-gtk2 configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge pinentry-gtk2

Remove pinentry-gtk2 configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge pinentry-gtk2

References

Summary

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