How To Install systemd-tests on Ubuntu 20.04

In this tutorial we learn how to install systemd-tests on Ubuntu 20.04. systemd-tests is tests for systemd tests for systemd

Introduction

In this tutorial we learn how to install systemd-tests on Ubuntu 20.04.

What is systemd-tests

systemd-tests is:

This package contains the test binaries. Those binaries are primarily used for autopkgtest and not meant to be installed on regular user systems.

Package: systemd-tests Architecture: amd64 Version: 245.4-4ubuntu3 Priority: optional Section: universe/admin Source: systemd Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian systemd Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 29294 Depends: libacl1 (>= 2.2.23), libapparmor1 (>= 2.9.0-3+exp2), libaudit1 (>= 1:2.2.1), libblkid1 (>= 2.24), libc6 (>= 2.30), libcap2 (>= 1:2.24-9~), libcryptsetup12 (>= 2:1.6.0), libdbus-1-3 (>= 1.9.14), libgcrypt20 (>= 1.8.0), libglib2.0-0 (>= 2.26.0), libgpg-error0 (>= 1.14), libidn2-0 (>= 2.0.0), libip4tc2 (>= 1.8.3), libkmod2 (>= 5~), liblz4-1 (>= 0.0~r130), libmount1 (>= 2.30), libpam0g (>= 0.99.7.1), libseccomp2 (>= 2.4.1), libselinux1 (>= 2.1.9), libsystemd0 (= 245.4-4ubuntu3), libudev1 (>= 215), systemd (= 245.4-4ubuntu3), zlib1g (>= 1:1.1.4), python3 Filename: pool/universe/s/systemd/systemd-tests_245.4-4ubuntu3_amd64.deb Size: 4513196 MD5sum: 162d989057f6059782d18c36dbfd52b6 SHA1: 39744cb178866003395c6c469abd843e7f3a43b8 SHA256: ecd4749eb23812aff5711abb4a44816d084c0e687c902669084d01e74defcf98 Homepage: https://www.freedesktop.org/wiki/Software/systemd Description-en: tests for systemd This package contains the test binaries. Those binaries are primarily used for autopkgtest and not meant to be installed on regular user systems.

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

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

sudo apt-get update

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

sudo apt-get -y install systemd-tests

Install systemd-tests Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install systemd-tests

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

sudo aptitude -y install systemd-tests

How To Uninstall systemd-tests on Ubuntu 20.04

To uninstall only the systemd-tests package we can use the following command:

sudo apt-get remove systemd-tests

Uninstall systemd-tests And Its Dependencies

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

sudo apt-get -y autoremove systemd-tests

Remove systemd-tests Configurations and Data

To remove systemd-tests configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge systemd-tests

Remove systemd-tests configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge systemd-tests

References

Summary

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