當前位置: 首頁>>技術教程>>正文


如何刪除安裝的所有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/zh-tw/article/2916.html,未經允許,請勿轉載。