How To Install autopkgtest on Ubuntu 20.04

In this tutorial we learn how to install autopkgtest on Ubuntu 20.04. autopkgtest is automatic as-installed testing for Debian packages automatic as-installed testing for Debian packages

Introduction

In this tutorial we learn how to install autopkgtest on Ubuntu 20.04.

What is autopkgtest

autopkgtest is:

autopkgtest runs tests on binary packages. The tests are run on the package as installed on a testbed system (which may be found via a virtualisation or containment system). The tests are expected to be supplied in the corresponding Debian source package.

See autopkgtest(1) and /usr/share/doc/autopkgtest. Depending on which virtualization server you want to use, you need to install additional packages (schroot, lxc, lxd, or qemu-system)

For generating tests of well-known source packages such as Perl and Ruby libraries you should install the autodep8 package.

Package: autopkgtest Architecture: all Version: 5.11ubuntu1 Priority: optional Section: devel Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian CI team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 559 Depends: python3, python3-debian, apt-utils, libdpkg-perl, procps Recommends: autodep8 Suggests: lxc, lxd, ovmf, qemu-efi-aarch64, qemu-efi-arm, qemu-system, qemu-utils, schroot, vmdb2 Breaks: debci (« 1.7~) Filename: pool/main/a/autopkgtest/autopkgtest_5.11ubuntu1_all.deb Size: 136964 MD5sum: 0f02f8b41f24a5fbeb34615c8280ae7b SHA1: f6a7183a5f1e39fa3b1ed66273d5b38d4faf0249 SHA256: 777375fac715d5c4666c3026c7034abc40803aba324646290bc486021f98fa6a Description-en: automatic as-installed testing for Debian packages autopkgtest runs tests on binary packages. The tests are run on the package as installed on a testbed system (which may be found via a virtualisation or containment system). The tests are expected to be supplied in the corresponding Debian source package.

See autopkgtest(1) and /usr/share/doc/autopkgtest. Depending on which virtualization server you want to use, you need to install additional packages (schroot, lxc, lxd, or qemu-system)

For generating tests of well-known source packages such as Perl and Ruby libraries you should install the autodep8 package.

There are three methods to install autopkgtest on Ubuntu 20.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 autopkgtest Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install autopkgtest

Install autopkgtest Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install autopkgtest

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

sudo aptitude -y install autopkgtest

How To Uninstall autopkgtest on Ubuntu 20.04

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

sudo apt-get remove autopkgtest

Uninstall autopkgtest And Its Dependencies

To uninstall autopkgtest and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove autopkgtest

Remove autopkgtest Configurations and Data

To remove autopkgtest configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge autopkgtest

Remove autopkgtest configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge autopkgtest

References

Summary

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