Software & AppsOperating SystemLinux

How To Completely Remove Kubuntu-Desktop from Ubuntu

Ubuntu 5

In this article, we will guide you through the process of completely removing the Kubuntu desktop from your Ubuntu system. This could be necessary if you installed Kubuntu as an alternative desktop environment but no longer need it and want to free up system resources. Before we start, it’s important to note that you should back up all important data and create a system restore point before proceeding.

Quick Answer

To completely remove Kubuntu-Desktop from Ubuntu, you can use methods such as using aptitude, Synaptic Package Manager, or manually removing packages. It’s important to be cautious and make sure you don’t remove any essential system packages. Always back up your data before making any significant changes to your system.

Method 1: Using aptitude

Aptitude is a text-based package manager that you can use to manage packages on your Ubuntu system. If you don’t have it installed, you can install it with the following command:

sudo apt-get install aptitude

The sudo command is used to execute the command as a superuser, apt-get is the package handling utility, install is the command to install a package, and aptitude is the package we want to install.

Once you have aptitude installed, you can use the following command to search for packages that are dependencies of Kubuntu but not Ubuntu’s default desktop:

sudo aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(ubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' ubuntu-desktop+

This command is a bit complex, so let’s break it down:

  • ?reverse-depends(kubuntu): This searches for all packages that kubuntu depends on.
  • ?not(?reverse-depends(ubuntu-desktop)): This excludes packages that ubuntu-desktop depends on.
  • ?automatic: This includes only packages that were installed automatically as dependencies.
  • ?not(?or(?priority(required), ?priority(important))): This excludes packages that have either “required” or “important” priority.

Review the list of packages that will be removed and make sure it doesn’t include any essential packages. You can add the packages you want to keep with a plus sign (+) at the end of the command, like the “ubuntu-desktop” package.

Finally, run the command to remove the packages:

sudo aptitude remove <package-list>

Method 2: Using Synaptic Package Manager

The Synaptic Package Manager is a graphical package management program for apt. It provides the same features as the apt-get command line utility with a GUI front-end.

First, install Synaptic Package Manager from the Software Center or using the command:

sudo apt-get install synaptic

Once installed, open Synaptic Package Manager and go to the “Sections” tab. Find the “KDE Desktop Environment” section and select all the installed (green) selections by Ctrl+Click. Right-click on the selected packages, choose “Completely remove,” and click the green check mark to apply the changes.

Method 3: Manually removing packages

This method involves manually searching for and removing the packages installed with Kubuntu. Go to the /var/log/apt directory and search for “kubuntu-desktop” in the history.log or compressed history.log.[n].gz files.

Once you’ve found the exact packages installed with Kubuntu, you can remove them using the apt-get purge command. For example:

sudo apt-get purge <package-name>

Method 4: Using tasksel (not recommended)

Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. This method is not recommended because it can lead to broken packages.

First, install tasksel if you don’t have it already:

sudo apt-get install tasksel

Then, run tasksel:

sudo tasksel

Find “Kubuntu desktop” in the list and remove its selection. Read and confirm the prompts. Finally, run sudo apt-get autoremove to remove any remaining dependencies.


In conclusion, there are several methods to completely remove Kubuntu-Desktop from your Ubuntu system. It’s crucial to be careful during this process to avoid removing essential system packages. Always ensure you have a backup of your important data before making significant changes to your system.

Is it safe to completely remove Kubuntu-Desktop from my Ubuntu system?

Yes, it is safe to remove Kubuntu-Desktop from your Ubuntu system. However, it’s important to be cautious and double-check the packages you are removing to avoid accidentally removing essential system packages.

Will removing Kubuntu-Desktop free up system resources?

Yes, removing Kubuntu-Desktop will free up system resources as it removes the packages and dependencies associated with the Kubuntu desktop environment. This can help improve the performance of your Ubuntu system.

Do I need to back up my data before removing Kubuntu-Desktop?

It is always recommended to back up your important data before making any significant changes to your system, including removing desktop environments. Although the removal process should not affect your personal files, it is better to be safe and have a backup in case of any unforeseen issues.

Can I reinstall Kubuntu-Desktop after removing it?

Yes, you can reinstall Kubuntu-Desktop after removing it if you change your mind. You can do this by using the appropriate package manager, such as apt-get or aptitude, to install the Kubuntu-Desktop package.

Will removing Kubuntu-Desktop affect my other installed applications?

Removing Kubuntu-Desktop should not affect your other installed applications, as long as you are careful not to remove any essential system packages. However, it’s always a good idea to review the list of packages that will be removed before proceeding, to ensure that no important dependencies are inadvertently removed.

Leave a Comment

Your email address will not be published. Required fields are marked *