Ways to Uninstall and Install xdg-desktop-portal-gtk on Ubuntu 22.04

Updated: August 27, 2022

xdg-desktop-portal-gtk provides a GTK+/GNOME implementation for the desktop-agnostic xdg-desktop-portal service. This allows sandboxed applications to request services from outside the sandbox using GTK+ GUIs (app chooser, file chooser, print dialog) or using GNOME services (session manager, screenshot provider). In this tutorial, I will show you ways to install xdg-desktop-portal-gtk Ubuntu 22.04.


  • OS: Ubuntu 22.04 is needed for xdg-desktop-portal-gtk to work
  • Privileges: Ascertain that you are able to execute sudo commands.

Prerequisites to install xdg-desktop-portal-gtk on Ubuntu 22.04

Install xdg-desktop-portal-gtk Ubuntu 22.04

xdg-desktop-portal-gtk is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install xdg-desktop-portal-gtk using APT

This is one of the popular ways to install any Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these steps to install xdg-desktop-portal-gtk on your Ubuntu 22.04.

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Update the APT database to download new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt-get -y update

Step 2: Install the package on Ubuntu 22.04. After updating the system, you can install xdg-desktop-portal-gtk Ubuntu by pasting this command into the terminal and executing it.

sudo apt-get -y install xdg-desktop-portal-gtk

Install xdg-desktop-portal-gtk using Aptitude

You must run this command to install Aptitude if you haven’t already done so on Ubuntu.

sudo apt-get install aptitude

After that, you can now install xdg-desktop-portal-gtk by following these steps:

Step 1: Obtain new packages from Ubuntu by updating the APT database. Launching the terminal and entering the following Linux command:

sudo apt update

Step 2: Start installing the packages on Ubuntu 22.04. You can now install xdg-desktop-portal-gtk Ubuntu by executing this command in the terminal.

sudo aptitude -y install xdg-desktop-portal-gtk

Uninstall xdg-desktop-portal-gtk on Ubuntu 22.04

Have you ever thought about how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone can easily uninstall any program, not just a package.

If you installed xdg-desktop-portal-gtk using APT or Aptitude, you could uninstall xdg-desktop-portal-gtk on Ubuntu by following this step:

sudo apt remove --auto-remove xdg-desktop-portal-gtk

To uninstall xdg-desktop-portal-gtk and remove its data and dependencies, you can also use the following command:

sudo apt autoremove --purge xdg-desktop-portal-gtk


In this guide, I showed you ways to install xdg-desktop-portal-gtk on Ubuntu 22.04 and some ways to uninstall xdg-desktop-portal-gtk too. Please do not hesitate to contact me if you require any assistance. I’m delighted to respond to them.