How To Install polkitd on Debian 12
Introduction
In this tutorial we learn how to install polkitd
on Debian 12.
What is polkitd
polkitd is:
polkit is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes. It was previously named PolicyKit.
It is a framework for centralizing the decision making process with respect to granting access to privileged operations for unprivileged (desktop) applications.
In a typical use of polkit, an unprivileged application such as gnome-disks sends requests via D-Bus or other inter-process communication mechanisms to a privileged system service such as udisks, which asks polkitd for permission to process those requests. This allows the application to carry out privileged tasks without making use of setuid, which avoids several common sources of security vulnerabilities.
This package provides the polkitd D-Bus service and supporting programs. The pkexec program is not included, and can be found in the pkexec package.
There are three methods to install polkitd
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 polkitd Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install polkitd
using apt-get
by running the following command:
sudo apt-get -y install polkitd
Install polkitd Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install polkitd
using apt
by running the following command:
sudo apt -y install polkitd
Install polkitd 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 polkitd
using aptitude
by running the following command:
sudo aptitude -y install polkitd
How To Uninstall polkitd on Debian 12
To uninstall only the polkitd
package we can use the following command:
sudo apt-get remove polkitd
Uninstall polkitd And Its Dependencies
To uninstall polkitd
and its dependencies that are no longer needed by Debian 12, we can use the command below:
sudo apt-get -y autoremove polkitd
Remove polkitd Configurations and Data
To remove polkitd
configuration and data from Debian 12 we can use the following command:
sudo apt-get -y purge polkitd
Remove polkitd configuration, data, and all of its dependencies
We can use the following command to remove polkitd
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge polkitd
Dependencies
polkitd have the following dependencies:
- adduser
- default-dbus-system-bus
- default-logind
- xml-core
- libc6
- libduktape207
- libexpat1
- libglib2.0-0
- libpam0g
- libpolkit-agent-1-0
- libpolkit-gobject-1-0
- libsystemd0
References
Summary
In this tutorial we learn how to install polkitd
package on Debian 12 using different package management tools: apt
, apt-get
and aptitude
.