This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
KDE/移除
本文介绍了删除和清理 KDE.
介绍
建议以干净的环境开始,以尽量减少问题,特别是在考虑以下操作之一时:
- 降级 KDE (eg. from snapshots/live ebuilds to the Portage version).
- 从 KDE 3 到 KDE 4完整升级。
- 从旧的 ebuild repository 移动到另一个或者是官方包。
卸载和删除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 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.