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


35

我有2台装有Ubuntu的计算机,但在两台计算机上我都安装了KDE,以便为用户提供另一个选择。由于Unity的进展非常顺利,因此暂时没有必要使用KDE。如何一键删除所有与KDE相关的软件包,释放空间以及Ubuntu中与KDE相关的任何内容,包括在启动或关闭PC时覆盖ubuntu的徽标,因为在安装KDE之后,Kubuntu徽标是默认的。如何使用简单的短命令行或GUI工具从所有KDE内容完全还原。

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




Answers:


21

您可以使用此命令(从此处开始)完全删除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的程序,则必须分别删除这些程序,然后运行sudo apt-get autoremove

警告:正如Munim所说,这将删除很多软件包,并且可能会删除在KDE之前(或在KDE之后但与它分开安装)安装的软件包以及作为KDE一部分安装的软件包。这有时可能会产生不可预测的结果,例如程序包配置问题。


syserss已经写了一个解释,你可能需要采取让你的系统工作,你删除这些软件包之后希望的方式有些采取进一步行动。

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

上面的步骤将删除所有的KDE软件,但不一定将您的系统恢复到KDE之前的安装状态。要将系统还原到kubuntu-desktop的预安装,还需要执行两个附加步骤。

第一个是修改Plymouth配置以删除“ Kubuntu”初始屏幕(这只是外观,但仍然令人讨厌且不干净,Ubuntu中记录的该文件在 启动时显示'Kubuntu'):

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

第二个是恢复lightdm配置,以使用单位表示符而不是kde-plasma-greeter。首先运行以下命令以打开lightdm配置页面- sudo gedit /etc/lightdm/lightdm.conf然后编辑/替换以下行:

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

我从KDE拼凑的最后一步 覆盖了lightdm登录屏幕如何返回原始统一ubuntu的登录屏幕?


4
我试图避免不得不执行如此大的命令行。我正在寻找类似于“ sudo apt-get remove kde4ever”的东西,并且完成了,很简单,它删除了与kde相关的任何东西。
路易斯·阿尔瓦拉多

2
您可以尝试先运行sudo apt-get remove kubuntu-desktop(假设这是为获取KDE而安装的软件包),然后sudo apt-get autoremove可能会删除许多您想删除的内容。...但是您为什么不想运行这么长的命令?将长命令粘贴到终端中似乎比短命令更复杂。(我不只是要求表明您应该运行该命令-如果我明白你为什么不想,那我或其他人,也许能推荐一个更合适,更适合解决您的具体需要)
Eliah Kagan

1
当我使用上述命令时,提示我将显示软件包将被删除,其中一些我知道我需要并在Unity中使用(例如r-base)。恐怕如果执行上述命令,我的系统将变得混乱。
ECII 2012年

1
就我而言,复制并粘贴到终端中似乎不起作用(我认为可能与缓冲区大小有关)。我要做的是将其粘贴到文本编辑器上,将其保存为.sh扩展名,然后运行它。
luisgonzalez

1
@Munim好点,我应该提到,这可能会删除与KDE分开安装的软件包。我在帖子的末尾添加了一个警告,希望它可以帮助准备考虑使用此技术的人们。
伊莱亚·卡根

35

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

apt-get remove kdelibs-bin kdelibs5-data 

感谢craigevilDebian论坛。(http://forums.debian.net/viewtopic.php?f=10&t=102884

这里的问题是,通过关注实际上构建了所​​有KDE的两个软件包,其余的KDE也被卸载了,因为它们取决于以上内容。


1
极好。适用于顽固的控制台安装。+1。
伊万斯

2
我认为这比接受的答案更好。它不会触摸标记为手动安装的软件包。
berbt

它说“未满足的依赖项”。
Nicolas Raoul

2
我认为,您也应该sudo apt autoremove在那之后运行
Qback

在尝试了几项从Ubuntu 16.04删除KDE东西并还原Unity系统设置后,这对我有用。比接受的答案好得多。'apt-get remove unity-control-center apt-get remove kdelibs-bin kdelibs5-data apt autoremove apt-get install unity-control-center reboot'瞧!!!
dimuthu

6

如果您使用的是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

2

现在要容易得多。
安装您以前的桌面环境(它应该在缓存中,因此您无需下载任何内容)

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



0

自从我是一个初学者以来,不知道这是否是正确的方法,但这对我有用。

sudo apt-get remove kde*

欢迎来到澳大利亚。您的回答可能对您的情况是正确的,但我不建议您将其用于一般用途,因为这可能会删除本不希望删除的软件包。
Marc Vanhoomissen

可能不是正确的命令,请参阅apt-get purge
pim

-4

我使用了以下命令(它删除了所有的KDE并安装了unity):

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-kresources \
kdepim-runtime kdepim-strigi-plugins 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  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 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 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 libopenexr6 libotr2 libphonon4 libplasma-geolocation-interface4 \
libplasma3  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 libtemplateparser4 libthreadweaver4 \
libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl \
libwww-robotrules-perl libxml2-utils libxss1 muon muon-installer \
muon-notifier muon-updater 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-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

4
欢迎来到AskUbuntu!虽然您的答案理论上可以回答问题,但是您可能希望添加信息以解释命令的作用。
Oyibo,2012年

4
-1用于粗心的copypasta。该列表不一定是OP已安装的列表,它可能会删除手动安装的软件包。甚至都没有安装Unity。
berbt
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.