How To Install insserv on Debian 11

In this tutorial we learn how to install insserv on Debian 11. insserv is boot sequence organizer using LSB init.d script dependency information

Introduction

In this tutorial we learn how to install insserv on Debian 11.

What is insserv

insserv is:

The insserv program is used by the standard SysV-based init system. It updates the order of symlinks in /etc/rc?.d/ based on dependencies specified by LSB headers in the init.d scripts themselves.

These declared relations between scripts make it possible to optimize the boot sequence for the currently installed set of packages, while detecting and rejecting dependency loops.

Using insserv incorrectly can result in an unbootable system.

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

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

sudo apt-get update

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

sudo apt-get -y install insserv

Install insserv Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install insserv

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

sudo aptitude -y install insserv

How To Uninstall insserv on Debian 11

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

sudo apt-get remove insserv

Uninstall insserv And Its Dependencies

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

sudo apt-get -y autoremove insserv

Remove insserv Configurations and Data

To remove insserv configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge insserv

Remove insserv configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge insserv

Dependencies

insserv have the following dependencies:

References

Summary

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