当前位置: 首页>>技术教程>>正文


如何删除安装的所有KDE痕迹

, ,

问题描述

我有两台装有Ubuntu的电脑但是我安装了KDE以便为用户提供另一种选择。由于Unity已经很好地发展,现在还没有必要使用KDE。如何在一次扫描中删除所有与KDE相关的软件包,释放空间以及Ubuntu中与KDE相关的任何内容,包括在PC启动或关闭后覆盖ubuntu的徽标,因为安装KDE后Kubuntu徽标是默认的。如何使用简单的短命令行或GUI工具完全恢复所有KDE的东西。

注意 – 我问这个是因为开始一个接一个地选择与KDE桌面环境相关的每个包,检查它是否与任何GTK有关,检查每个包的依赖关系等是非常耗时的。删除包kubuntu-desktop不会删除随其安装的每个已安装的KDE软件包,因为这是一个伪软件包,可以安装其余的真实软件包,但不会卸载它们,这让我想知道为什么软件包可以安装一大堆其他软件包而不是卸载它们添加一些选项来实际卸载它们而不仅仅是虚拟包本身。

最佳解决办法

您可以使用此命令(来自here)完全删除KDE:

sudo apt-get remove akonadi-backend-mysql akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia cdrdao docbook-xsl dolphin dragonplayer freespacenotifier gnupg-agent gnupg2 gpgsm gstreamer0.10-qapt gtk2-engines-oxygen gwenview ibus-qt4 icoutils jockey-kde k3b k3b-data kaccessible kaddressbook kamera kate kate-data katepart kcalc kde-baseapps-bin kde-baseapps-data kde-config-gtk kde-config-touchpad kde-runtime kde-runtime-data kde-wallpapers-default kde-window-manager kde-workspace kde-workspace-bin kde-workspace-data kde-workspace-kgreet-plugins kde-zeroconf kdebase-runtime kdegames-card-data kdegraphics-strigi-analyzer kdelibs-bin kdelibs5-data kdelibs5-plugins kdemultimedia-kio-plugins kdenetwork-filesharing kdepasswd kdepim-groupware kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepim-wizards kdepimlibs-kio-plugins kdesudo kdm kdoctools kfind khelpcenter4 kinfocenter klipper kmag kmail kmix kmousetool knotes konsole kontact kopete kopete-message-indicator korganizer kpat kppp ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-netbook-default-settings kubuntu-notification-helper kubuntu-web-shortcuts kvkbd kwalletmanager language-selector-kde libakonadi-calendar4 libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadiprotocolinternals1 libassuan0 libattica0 libbluedevil1 libboost-program-options1.46.1 libcalendarsupport4 libcln6 libclucene0ldbl libdebconf-kde0 libdiscid0 libdlrestrictions1 libdmtx0a libencode-locale-perl libepub0 libeventviews4 libfile-listing-perl libflac++6 libfont-afm-perl libgadu3 libgpgme++2 libgps19 libgrantlee-core0 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libibus-qt1 libilmbase6 libincidenceeditorsng4 libindicate-qt1 libio-socket-ssl-perl libiodbc2 libk3b6 libkabc4 libkateinterfaces4 libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 libkcalutils4 libkcddb4 libkcmutils4 libkde3support4 libkdecorations4 libkdecore5 libkdegames5a libkdepim4 libkdepimdbusinterfaces4 libkdesu5 libkdeui5 libkdewebkit5 libkdgantt2 libkdnssd4 libkemoticons4 libkephal4abi1 libkexiv2-10 libkexiv2-data libkfile4 libkholidays4 libkhtml5 libkidletime4 libkimap4 libkio5 libkipi-data libkipi8 libkjsapi4 libkjsembed4 libkldap4 libkleo4 libkmanagesieve4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq-common libkonq5-templates libkonq5abi1 libkontactinterface4 libkopete4 libkparts4 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 libkresources4 libkrosscore4 libksba8 libkscreensaver5 libksgrd4 libksieve4 libksieveui4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libktorrent3 libkunitconversion4 libkwineffects1abi2 libkworkspace4 libkxmlrpcclient4 liblastfm0 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailcommon4 libmailtools-perl libmailtransport4 libmessagecomposer4 libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libmpcdec6 libmsn0.3 libmuonprivate1 libmusicbrainz3-6 libnepomuk4 libnepomukquery4a libnepomukutils4 libnet-http-perl libnet-ssleay-perl libntrack-qt4-1 libntrack0 libokularcore1 libopenexr6 libotr2 libphonon4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4abi2 libplasmagenericshell4 libpolkit-qt-1-1 libpoppler-qt4-3 libprison0 libprocesscore4abi1 libprocessui4a libqalculate5 libqapt-runtime libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 libqrencode3 libqt4-designer libqt4-help libqt4-qt3support libqt4-scripttools libqt4-sql-sqlite libqt4-test libqtassistantclient4 libqtglib-2.0-0 libqtgstreamer-0.10-0 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 libreoffice-kde libreoffice-style-oxygen libsolid4 libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 libsyndication4 libtag-extras1 libtaskmanager4abi2 libtemplateparser4 libthreadweaver4 libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl libwww-robotrules-perl libxml2-utils libxss1 libzip1 muon muon-installer muon-notifier muon-updater mysql-client-core-5.1 mysql-server-core-5.1 ntrack-module-libnl-0 odbcinst odbcinst1debian2 okular okular-extra-backends oxygen-cursor-theme oxygen-icon-theme oxygen-icon-theme-complete partitionmanager phonon phonon-backend-gstreamer pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-netbook plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-kimpanel-backend-ibus plasma-widget-menubar plasma-widget-message-indicator plasma-widget-networkmanagement plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text printer-applet python-kde4 python-pyudev python-qt4 python-qt4-dbus python-sip qapt-batch qapt-deb-installer quassel quassel-data rekonq shared-desktop-ontologies software-properties-kde soprano-daemon system-config-printer-kde systemsettings update-manager-kde usb-creator-kde userconfig virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common && sudo apt-get install ubuntu-desktop

但是,如果您在安装KDE后手动安装了KDE-specific程序,则必须单独删除这些程序,然后运行sudo apt-get autoremove

警告:作为Munim says,这将删除大量软件包,并可能删除在KDE之前(或在KDE之后但与其分开)安装的软件包以及作为KDE的一部分安装的软件包。这可能偶尔会产生不可预测的结果,例如包配置问题。


syserss具有written an explanation,您可以采取一些进一步的操作,以便在删除这些软件包后使系统按照您希望的方式工作。

(我在下面引用它,但为了便于阅读,将引文格式更改为嵌入式链接。)

The steps above will remove all of the KDE software, but it won’t necessarily restore your system back to pre-KDE install state. There are two additional steps that I had to do to restore my system to pre-installation of kubuntu-desktop.

The first was to modify the Plymouth configuration to remove the “Kubuntu” splash screen (this is just cosmetic, but still annoying and unclean, documented in Ubuntu shows ‘Kubuntu’ on boot):

sudo update-alternatives --config default.plymouth sudo update-initramfs -u 

And the second was to restore the lightdm configruation to use the unity-greeter instead of kde-plasma-greeter. First run this command to open the lightdm configuration page – sudo gedit /etc/lightdm/lightdm.conf and then edit / replace these lines:

greeter-session=unity-greeter user-session=ubuntu 

This last step I cobbled together from KDE overrides lightdm logon screen and How to return the login screen of the original unity ubuntu?.

次佳解决办法

我更喜欢以下删除的简单性:

apt-get remove kdelibs-bin kdelibs5-data 

感谢Debian论坛上的craigevil。 (http://forums.debian.net/viewtopic.php?f=10&t=102884)

这里的问题是,通过关注构建几乎所有KDE的两个软件包,其余的KDE也会被卸载,因为它们依赖于上述内容。

第三种解决办法

如果您使用的是ubuntu 15.10或更早版本,则此命令很有用:

sudo apt-get remove kubuntu

如果您使用的是Ubuntu 16.04和Plasma 5,请按照以下步骤操作

sudo apt purge kubuntu-desktop
sudo apt autoremove
sudo add-apt-repository --remove ppa:kubuntu-ppa/backports

第四种办法

现在好多了。安装以前的桌面环境(它应该在缓存中,所以你不需要下载任何东西)

sudo apt install ubuntu-desktop

您仍将在启动屏幕上看到kubuntu。所以要删除它

sudo update-initramfs -u

重启。在登录屏幕上,选择KDE以外的桌面会话

最后删除所有kde的痕迹

sudo apt remove --purge kubuntu-desktop
sudo apt autoremove

如果你仍然看到kde登录界面(很少)

sudo dpkg-reconfigure gdm3
sudo apt remove --purge sddm

将gdm3替换为当前桌面环境的显示管理器。 ubuntu常见的是gdm,lightdm

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/2916.html,未经允许,请勿转载。