How To Install policy-rcd-declarative on Ubuntu 20.04
Introduction
In this tutorial we learn how to install policy-rcd-declarative
on Ubuntu 20.04.
What is policy-rcd-declarative
policy-rcd-declarative is:
Debian policy states that packages providing system services need to start those services by default, and that the starting of the service should be done by way of the /usr/sbin/invoke-rc.d script. This script will execute a program /usr/sbin/policy-rc.d if it exists, allowing the local system administrator to override behaviour if wanted by creating a policy script accordin to the interface specified and installing it under the correct name. This interface is however somewhat problematic, as explained in https://bugs.debian.org/911290.
This package attempts to provide a solution by shipping a policy-rc.d script that allows system administrators to define policies in a declarative way through one or more configuration files, rather than providing one script that may be overwritten.
There are three methods to install policy-rcd-declarative
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 policy-rcd-declarative Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install policy-rcd-declarative
using apt-get
by running the following command:
sudo apt-get -y install policy-rcd-declarative
Install policy-rcd-declarative Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install policy-rcd-declarative
using apt
by running the following command:
sudo apt -y install policy-rcd-declarative
Install policy-rcd-declarative 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 policy-rcd-declarative
using aptitude
by running the following command:
sudo aptitude -y install policy-rcd-declarative
How To Uninstall policy-rcd-declarative on Ubuntu 20.04
To uninstall only the policy-rcd-declarative
package we can use the following command:
sudo apt-get remove policy-rcd-declarative
Uninstall policy-rcd-declarative And Its Dependencies
To uninstall policy-rcd-declarative
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove policy-rcd-declarative
Remove policy-rcd-declarative Configurations and Data
To remove policy-rcd-declarative
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge policy-rcd-declarative
Remove policy-rcd-declarative configuration, data, and all of its dependencies
We can use the following command to remove policy-rcd-declarative
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge policy-rcd-declarative
References
Summary
In this tutorial we learn how to install policy-rcd-declarative
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.