How To Install libtime-mock-perl on Debian 11

In this tutorial we learn how to install libtime-mock-perl on Debian 11. libtime-mock-perl is shift and scale time Perl module

Introduction

In this tutorial we learn how to install libtime-mock-perl on Debian 11.

What is libtime-mock-perl

libtime-mock-perl is:

Test::MockTime is nice, but doesn’t allow you to accelerate the timestep and doesn’t deal with Time::HiRes or give you any way to change the time across forks. Time::Mock speed up your sleep(), alarm(), and time() calls.

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

Install libtime-mock-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 libtime-mock-perl using apt-get by running the following command:

sudo apt-get -y install libtime-mock-perl

Install libtime-mock-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtime-mock-perl using apt by running the following command:

sudo apt -y install libtime-mock-perl

Install libtime-mock-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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libtime-mock-perl using aptitude by running the following command:

sudo aptitude -y install libtime-mock-perl

How To Uninstall libtime-mock-perl on Debian 11

To uninstall only the libtime-mock-perl package we can use the following command:

sudo apt-get remove libtime-mock-perl

Uninstall libtime-mock-perl And Its Dependencies

To uninstall libtime-mock-perl and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove libtime-mock-perl

Remove libtime-mock-perl Configurations and Data

To remove libtime-mock-perl configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge libtime-mock-perl

Remove libtime-mock-perl configuration, data, and all of its dependencies

We can use the following command to remove libtime-mock-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtime-mock-perl

Dependencies

libtime-mock-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libtime-mock-perl package on Debian 11 using different package management tools: apt, apt-get and aptitude.