How To Install runit-services on Debian 12

Learn how to install runit-services on Debian 12 with this tutorial. runit-services is UNIX init scheme with service supervision (services)

Introduction

In this tutorial we learn how to install runit-services on Debian 12.

What is runit-services

runit-services is:

runit is a replacement for SysV-init and other init schemes. It runs on Debian GNU/Linux, *BSD, MacOSX, and Solaris, and may be easily adapted to other Unix operating systems. runit implements a simple three-stage concept. Stage 1 performs the system’s one-time initialization tasks. Stage 2 starts the system’s uptime services (via the runsvdir program). Stage 3 handles the tasks necessary to shutdown and halt or reboot.

See http://smarden.org/runit/ for more information.

This package contains services directories for a collection of services available in Debian, to have them run under runit service supervision instead of sysvinit or systemd. Services directories are installed under /usr/share/runit/sv/ and only services of packages that are installed on the system are copied to /etc/sv/. The cpsv utility can be used to copy, inspect and update runscripts in /etc/sv/ after the first installation. It’s recommended to read https://salsa.debian.org/Lorenzo.ru.g-guest/runit-services/-/blob/master/README before installing this package.

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

Install runit-services Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install runit-services

Install runit-services Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install runit-services

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

sudo aptitude -y install runit-services

How To Uninstall runit-services on Debian 12

To uninstall only the runit-services package we can use the following command:

sudo apt-get remove runit-services

Uninstall runit-services And Its Dependencies

To uninstall runit-services and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove runit-services

Remove runit-services Configurations and Data

To remove runit-services configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge runit-services

Remove runit-services configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge runit-services

Dependencies

runit-services have the following dependencies:

References

Summary

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