Important: You are required to change your passwords used for Gentoo services and set an email address for your Wiki account if you haven't done so. See the full announcement and Wiki email policy change for more information.


From Gentoo Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.

This article describes the removal and clean up of KDE.


It is recommended to begin with a clean environment in order to minimize issues, especially when considering one of the following actions:

  • Downgrading KDE (eg. from snapshots/live ebuilds to the Portage version)
  • Fully upgrading from KDE 3 to KDE 4
  • Moving from an old overlay to a different one or the official packages

Uninstalling and removing KDE

Uninstall all packages remotely depending on KDE

A possible way to completely remove an old KDE installation is by explicitly uninstalling all kde-base packages and software depending on kde-base/kdelibs:

root # emerge --ask --depclean kde-base/kdelibs $(qlist -IC 'kde-base/*') $(for name in $(qlist -IC | grep -v '^kde-base/') ; do ( qdepends -C $name | grep -q kdelibs ) && echo $name ; done)

Note that this will not just remove KDE but also all other packages depending on it (unconditionally or through a USE flag dependency), such as e.g. libreoffice[kde].

Uninstall KDE packages provided by the KDE overlay

Removing KDE is also possible through sets (as provided by the kde overlay):

root # emerge --ask -C @kde-4.X @kdebase-4.X @kde-3.5

Deselecting overlays

If any old overlays are still defined, deselect them so that there are no conflicts with the KDE ebuilds.

Clean up portage definitions

Look in /etc/portage for any KDE specific settings in package.mask, package.unmask, package.keywords and package.accept_keywords. Clean up those definitions pertaining to KDE packages.

Remove unneeded dependencies

After uninstalling KDE packages, ask Portage to uninstall any now unneeded dependencies:

root # emerge --ask --depclean  

Clean up KDE remains

If the system uses the desktop/kde profile, change to the desktop profile. Also check in /etc/portage/make.conf and other configurations files what the active USE flags are.

Remove the remaining KDE configuration files and app data in the following folders:

  • ~/.kde - Configuration files and app data of KDE 3
  • ~/.kde4 - Configuration files and app data of KDE 4
  • /usr/kde/ - App data of KDE 3
  • /var/lib/kde - Configuration files of KDE 4
  • /var/lib/kdm - Configuration files of KDM
  • /var/log/kdm.log - KDM log file

The following folders are shared folders. Only remove the KDE related files:

  • ~/.config - Configuration files of KDE apps
  • ~/.local - App data of KDE apps
  • /etc/conf.d/xdm - XDM configuration file