From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page KDE/Removal and the translation is 35% complete.
Other languages:
Deutsch • ‎English • ‎русский • ‎中文(中国大陆)‎ • ‎한국어
 As of 10 June 2017‎, the information in this article is probably outdated. You can help the Gentoo community by verifying and updating this article.

本文介绍了删除和清理 KDE.



  • 降级 KDE (eg. from snapshots/live ebuilds to the Portage version).
  • 从 KDE 3 到 KDE 4完整升级。
  • 从旧的 ebuild repository 移动到另一个或者是官方包。


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 ebuild repository

Removing KDE is also possible through sets (as provided by the KDE ebuild repository):

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

Deselecting ebuild repositories

If any old repositories 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.