How to Disable the Ubuntu ‘Polkitd’ (PolicyKit) Daemon (Servers Only)

The Desktop Authorization Relic

In Ubuntu, polkitd (PolicyKit) is a system-level component that acts as an authorization manager. On a desktop system with a graphical user interface (GUI), PolicyKit is essential; it is the framework that prompts you with a nice graphical popup asking for your password when you try to install software via the Ubuntu Software Center, or when you try to change network settings as a standard user.

However, if you are running a pure, headless Ubuntu Server without a GUI, you manage everything via the command line using sudo. On a headless server, the polkitd daemon sits in the background consuming memory but serves almost no practical purpose, as command-line users authenticate directly via PAM and sudoers files. If you are optimizing a lightweight container or a strict server environment, you can safely remove it.

How to Disable PolicyKit on Ubuntu Servers

Because it is a core system service, the best way to disable it on a headless machine is to completely uninstall the package.

  1. Open your Ubuntu Terminal (or connect via SSH).
  2. CRITICAL WARNING: Do not run these commands if you have a Desktop GUI installed (like GNOME, KDE, or XFCE). Removing polkitd will break graphical authentication and you will not be able to log in or manage your system via the desktop interface. Only proceed if you are on a purely headless server.
  3. First, stop the running service:
sudo systemctl stop polkit.service
  1. Next, remove the PolicyKit packages. The --purge flag ensures all configuration files are also deleted:
sudo apt-get remove --purge policykit-1 polkitd
  1. Finally, run autoremove to clean up any orphaned dependencies that were only installed to support PolicyKit:
sudo apt-get autoremove

Your server will now operate slightly leaner, relying entirely on the standard sudo mechanism for all administrative tasks without the unnecessary overhead of the graphical authorization daemon.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.