Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Saturday, May 11, 2019 at 20:46

A friend from a community gave me an idea after last article to remove XFCE from Mint XFCE "Tessa". Thanks to him, I searched, and I did a removal that works on that Mint which already have additional KDE and GNOME installed. The XFCE components (no less than 50) are all gone, including Thunar File Manager and XFCE4 Session, resulting in a feeling like removing just one application. This tutorial is intended for users who want to remove the desktop environment and ready for the risk. Happy working!

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.


Strategy


The plan is first to have an alternative GUI, in this case the small lightweight Openbox WM, and performing the complete removal, and finally installing back some Mint system-related programs. This tutorial will not and is not supposed to remove Xorg (Mint's display server), Lightdm (Mint's login screen), and APT (Mint's package manager). You are free to perform just the removal if you wish.

1. Install Openbox


This is so you will have at least a working GUI after removal of the XFCE GUI. If you don't do this, your Mint system will works only with CLI (e.g. tty screen). If you wish something other than Openbox, see the KDE + GNOME tutorial.
$ sudo apt-get install openbox


2. Remove XFCE


This command line will list all packages with xfce in their names, take only the package names, and feed those package names in to a special apt-get purge command line. This way you do not need to remove every one of those 50+ package names one by one.
$ dpkg -l | grep .xfce. | xargs sudo apt-get purge --auto-remove --yes

Some explanations:
  • dpkg -l  lists all installed packages
  • grep .xfce.  filters so that only packages with keyword xfce within their names listed
  • xargs  changes multiple line input from previous command to be single line input for next command
  • sudo apt-get purge  removes listed packages from input
  • --auto-remove  tries to remove dependency packages too
  • --yes  makes apt-get automatically answers yes for everything

For troubleshooting purpose, you can add one more pipeline command at the end  | tee --append removal.txt  to record the whole removal process in a plain text named removal.txt.

3. Final Check


This command should show nothing if it's true that all XFCE components were successfully removed.
$ dpkg -l | grep .xfce.

Try to logout and check whether XFCE session doesn't exist anymore from session choice menu.

4. Install Back Some


This steps is safe to abandon, but if you wish some Mint-related components that were removed above, you are free to install them back.
$ sudo apt-get install mintdesktop mintsystem mintwelcome



References