How to uninstall xfce Desktop Environment Debian

How to install (and uninstall) XFCE on Ubuntu

Xfce is an open-source and free desktop environment for Linux operating systems. Xfce is full of great features that make it easy to use. It consumes minimal memory and CPU, making it lightweight and fast compared to other Linux desktops, like GNOME and KDE. An Xfce has two panels that hold the most used application launchers.

The two panels can be customized, modified with extra items as needed by the user, or completely hidden if you want. Xfce’s default file manager is straightforward to use, simple, customizable, and easy to learn.

If you are looking for a light-weight, stable, and highly customizable desktop, XFCE is the one for you. You can also look at our detailed desktop environment comparison guide on the ten reasons to use XFCE.

In this tutorial, we are going to walk you through the following points:

  • Installation of the Xfce desktop on an Ubuntu machine using two various methods so that you can choose the one you want
  • Uninstallation of Xfce desktop from Ubuntu.

However, before we can start, let's make sure that you have an updated system using the following commands:

sudo apt update sudo apt upgrade

Installing Xfce Desktop on Ubuntu

To easily install the Xfce on your Ubuntu machine, you can use one of the following methods:

  • Using Xfce package
  • Using Xubuntu package

Method 1: Install Xfce Desktop using Xfce Package

If you decided to use this method, then the Xfce desktop will be installed with few basic packages like the default file manager for the Xfce desktop and the Thunar file manager. Some applications will remain the same, such as the terminal - it will be the same as the GNOME default terminal.

Step 1. Install the Xfce package.

sudo apt install xfce4

Step 2. Configure the lightdm display manager. Just press the "Enter"Button to choose the" gdm3 "option.

Step 3. Now you need to logout to start using the Xfce desktop. Hence, from the desktop, press the drop-down arrow and choose the Power Off / Log out option.

Step 4. Next, choose the "Log Out" option.

Step 5. When the logout process finishes successfully, you can press the settings menu. Then select the Xfce session option to start the Xfce desktop.

Step 6. Welcome to the Xfce desktop.

Method 2: Install Xfce Desktop using Xubuntu Package

However, if you choose to install the Xubuntu package, you will get the Xfce desktop and many extra packages for a true Xfce desktop experience. For example, the terminal will be the default Xubuntu’s terminal, not the default GNOME terminal.

Step 1. Install the Xubuntu package using the following command.

sudo apt install xubuntu-desktop

Step 2. Next, logout to start using the Xfce desktop.

Step 3. At the login screen, select the settings button and choose the “Xubuntu Session” option.

Step 4. Welcome to the Xfce desktop.

Uninstalling the Xfce Desktop on Ubuntu

If you need to uninstall the Xfce desktop, you should first ensure that you have not deleted the default Ubuntu desktop. Let's check how to uninstall the Xfce desktop correctly without causing major issues such as a blank screen and no login window!

Step 1. Ensure that you logout from the Xfce desktop. Then click the Linux username from the top right of the desktop and select the Log out option.

Step 2. At the login screen, press the settings button, then select one of the Ubuntu main desktops.

Uninstall the Xfce Package

Step 1. Once you logged into the Ubuntu desktop, then open the terminal and use the following command to remove the installed Xfce package.

sudo apt-get purge xubuntu-icon-theme xfce4 *

Step 2. Now use the autoremove option.

sudo apt autoremove

Uninstall the Xubuntu Package

Step 1. In case you have installed the Xubuntu package, you can use the following command.

sudo apt-get purge xubuntu-desktop xubuntu-icon-theme xfce4 *

Step 2. Also, remove any other themes.

Step 3. Do not forget to use the autoremove option.

sudo apt autoremove

Step 4. Finally, when you log out, you can check the main desktops. As you can see, there are no Xfce desktops installed.

Congratulations, you have just learned how to install and uninstall the Xfce desktop.