How To Install libtap-parser-sourcehandler-pgtap-perl on Ubuntu 18.04

In this tutorial we learn how to install libtap-parser-sourcehandler-pgtap-perl on Ubuntu 18.04. libtap-parser-sourcehandler-pgtap-perl is Unit testing tools for pgTAP

Introduction

In this tutorial we learn how to install libtap-parser-sourcehandler-pgtap-perl on Ubuntu 18.04.

What is libtap-parser-sourcehandler-pgtap-perl

libtap-parser-sourcehandler-pgtap-perl is:

TAP::Parser::SourceHandler::pgTAP is a set of tools for PostgreSQL unit testing. It contains the pg_prove and pg_tapgen scripts, which allows running and harnessing pgTAP tests on command-line, and summarizing the results.

The corresponding PostgreSQL extension is contained in the postgresql-pgtap package.

TAP is the Test Anything Protocol (http://testanything.org/).

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

sudo apt-get -y install libtap-parser-sourcehandler-pgtap-perl

Install libtap-parser-sourcehandler-pgtap-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtap-parser-sourcehandler-pgtap-perl using apt by running the following command:

sudo apt -y install libtap-parser-sourcehandler-pgtap-perl

Install libtap-parser-sourcehandler-pgtap-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 libtap-parser-sourcehandler-pgtap-perl using aptitude by running the following command:

sudo aptitude -y install libtap-parser-sourcehandler-pgtap-perl

How To Uninstall libtap-parser-sourcehandler-pgtap-perl on Ubuntu 18.04

To uninstall only the libtap-parser-sourcehandler-pgtap-perl package we can use the following command:

sudo apt-get remove libtap-parser-sourcehandler-pgtap-perl

Uninstall libtap-parser-sourcehandler-pgtap-perl And Its Dependencies

To uninstall libtap-parser-sourcehandler-pgtap-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libtap-parser-sourcehandler-pgtap-perl

Remove libtap-parser-sourcehandler-pgtap-perl Configurations and Data

To remove libtap-parser-sourcehandler-pgtap-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libtap-parser-sourcehandler-pgtap-perl

Remove libtap-parser-sourcehandler-pgtap-perl configuration, data, and all of its dependencies

We can use the following command to remove libtap-parser-sourcehandler-pgtap-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtap-parser-sourcehandler-pgtap-perl

References

Summary

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