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


如何从Ubuntu上完全删除kubuntu-desktop

,

问题描述

我安装了kubuntu-desktop只是为了试验其界面。然后,我决定删除并进行传统的apt-get清除和自动删除,但似乎kubuntu的元素仍然存在。例如,界面元素,滚动条,引导屏幕等仍然存在。

有什么方法可以在不安装ubuntu副本的情况下完全删除?

最佳思路

我建议您使用aptitude来执行此操作,这将搜索将删除KDE环境并保留Ubuntu默认设置的软件包:

sudo apt-get install aptitude
aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(ubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' ubuntu-desktop+

这将搜索kubuntu-desktop依赖但不依赖ubuntu-desktop的任何程序包。而且,这种方法有点贪心。它将删除Qt软件包,ergo mplayer2,VLC,并且所有依赖于Qt库的软件包都可能被删除。在末尾添加那些带有加号(+)的软件包,例如ubuntu-desktop软件包。对于其他口味:

Xubuntu

aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(xubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' xubuntu-desktop+

Lubuntu

aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(lubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' lubuntu-desktop+

Gnome

aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(ubuntu-gnome-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' ubuntu-gnome-desktop+

如您所见,仅将最后一个软件包名称替换为您首选离开的名称。如果您使用了kde-core或其他元软件包,则应使用元软件包的名称替换”kubuntu”。

了解智能搜索

为了确切说明选择了哪个软件包,让我们更深入地说明搜索命令:

?and(
    ?and(
        ?and(                          // we're searching for packages that are
            ?reverse-depends(kubuntu), // reverse dependencies of kubuntu
            ?not(?reverse-depends(ubuntu-desktop)) // and not of ubuntu-desktop
            ),     // that fulfills the condition above 
        ?automatic // and is automatically installed
        ),
     ?not(                        // and also that are not
         ?or(                     // either required nor important
              ?priority(required),
              ?priority(important)
             )
         )
    )

次佳思路

在14.04 LTS 64Bit中

sudo apt-get remove libkde3support4 k3b-data ntrack-module-libnl-0 libkrosscore4 libgpgme++2 libqapt2 oxygen-icon-theme libktexteditor4 libtaskmanager4abi5 kdenetwork-filesharing libkblog4 libchm1 plasma-widgets-addons libkimap4 plasma-netbook libkdeui5 libkdeclarative5 ttf-oxygen-font-family gtk3-engines-oxygen user-manager gpgsm libakonadi-kcal4 kdepim-kresources libruby1.9.1 plymouth-theme-kubuntu-logo libqt4-sql-mysql libmailtransport4 kde-telepathy-filetransfer-handler kde-zeroconf libkpimtextedit4 konsole liblastfm1 libqjson0 libtag-extras1 libkdecorations4abi1 libkdcraw23 libkpeople3 kdepimlibs-kio-plugins libqrencode3 libkparts4 libakonadiprotocolinternals1 libbalooxapian4 akonadi-server nepomuk-core-data libqca2 kubuntu-notification-helper kdemultimedia-kio-plugins libntrack0 kde-runtime-data cdparanoia libplasma-geolocation-interface4 quassel-data libkemoticons4 libmessagecomposer4 libweather-ion6 cdrdao libnepomukquery4a bluedevil libakonadi-notes4 libkmediaplayer4 libksieveui4 muon-discover libmicroblog4 libnetworkmanagerqt1 libqt4-qt3support libkcddb4 amarok-utils libmailcommon4 libktpcommoninternalsprivate7 libprocessui4a katepart libmusicbrainz5-0 libkwineffects1abi4 libreoffice-base libkdepim4 kaddressbook soprano-daemon libmessageviewer4 libkwinglesutils1 libsoprano4 libqapt2-runtime vcdimager libcln6 libvirtodbc0 libbaloopim4 okular libqca2-plugin-ossl libkonq5abi1 ubuntu-release-upgrader-qt python3-pyqt4 libkephal4abi1 libksba8 kdesudo libqoauth1 gnupg-agent libxerces-c3.1 kde-telepathy-data kdelibs5-plugins kcalc libqmobipocket1 systemsettings libkolabxml1 libsyndication4 libkjsapi4 libplasmagenericshell4 libksane0 libkprintutils4 knotes libkactivities6 libincidenceeditorsng4 lightdm-kde-greeter libreoffice-sdbc-firebird libiso9660-8 kubuntu-docs amarok gwenview libkcalcore4 virtuoso-opensource-6.1-common libkmbox4 virtuoso-opensource-6.1-bin libakonadi-contact4 libakonadi-socialutils4 plasma-widget-kimpanel kde-touchpad python3-dbus.mainloop.qt libqtscript4-gui python3-pykde4 plasma-widget-menubar libxcb-record0 libkcompactdisc4 kde-config-telepathy-accounts libkabc4 libkunitconversion4 okular-extra-backends plymouth-theme-kubuntu-text libcryptsetup4 ktorrent-data libknewstuff3-4 kde-workspace-kgreet-plugins kde-config-tablet gstreamer0.10-qapt akregator libxcb-xtest0 libnepomukutils4 odbcinst1debian2 kate libkmanagesieve4 libprocesscore4abi1 libqtscript4-network libksane-data ibus-qt4 ttf-dejavu-core libyaml-0-2 libkxmlrpcclient4 plasma-nm libpam-ck-connector libqgpgme1 print-manager libksignalplotter4 libkipi-data klipper libakonadi-kmime4 gtk2-engines-oxygen kde-telepathy-text-ui libkhtml5 libkcal4 libkmime4 ksysguardd kontact libmailimporter4 libakonadi-calendar4 libprison0 libsendlater4 libntrack-qt4-1 libsignon-qt1 libkldap4 libkfile4 kubuntu-settings-desktop libpoppler-qt4-4 kamera libbaloofiles4 libtelepathy-qt4-2 libnoteshared4 libakonadi-kde4 libreoffice-kde icoutils libgrantlee-gui0 socat libkdepimdbusinterfaces4 audiocd-kio libmodemmanagerqt1 liboath0 libmessagecore4 libqtglib-2.0-0 kde-baseapps-bin kubuntu-driver-manager libattica0.4 libmygpo-qt1 libkdesu5 libknewstuff2-4 dragonplayer libdlrestrictions1 libgps20 kde-telepathy-send-file libstreams0 libkidletime4 libkateinterfaces4 libknotifyconfig4 qapt-deb-installer libtemplateparser4 about-distro dolphin kinfocenter libplasmaclock4abi4 amarok-common kaccessible libqtscript4-uitools libxcb-composite0 libkcalutils4 libreoffice-java-common usb-creator-kde libkdecore5 kdelibs-bin plasma-desktop skanlite kmag kdegraphics-strigi-analyzer nepomuk-core-runtime plasma-scriptengine-javascript libperl4-corelibs-perl qapt-batch kde-wallpapers-default libloudmouth1-0 libqaccessibilityclient0 libktnef4 libflac++6 libnepomuk4 libkleo4 odbcinst pam-kwallet libstreamanalyzer0 libkdcraw-data docbook-xsl libkntlm4 libopenconnect2 software-properties-kde ktorrent krdc kmousetool kde-workspace-data libqtscript4-core partitionmanager cryptsetup libvcdinfo0 libboost-thread1.54.0 libkfbapi1 libxcb-damage0 ruby1.9.1 libkcmutils4 libkpimidentities4 libreoffice-style-oxygen k3b libkworkspace4abi2 colord-kde libkfilemetadata4 kde-style-oxygen libdebconf-kde0 libktorrent-l10n libpolkit-qt-1-1 libkolab0 libepub0 libkdgantt2-0 kubuntu-settings-netbook libqtscript4-xml kubuntu-web-shortcuts libtelepathy-logger-qt4-1 libkactivities-models1 libkpimutils4 freespacenotifier pinentry-qt4 kde-config-gtk-style libkgapi2-2 baloo libkubuntu0 python3-sip kmix libkio5 libxml2-utils ksnapshot libktorrent5 libakonadi-kabc4 libpimcommon4 kde-config-whoopsie libkpgp4 khelpcenter4 oxygen-cursor-theme shared-desktop-ontologies libkexiv2-data libplasma3 muon-updater kde-config-pimactivity kde-telepathy libaccounts-qt1 kdepasswd libqtscript4-sql libkexiv2-11 libkontactinterface4 libmessagelist4 kde-telepathy-integration-module kdepim-runtime libkscreen1 && sudo apt-get install ubuntu-desktop

第三种思路

尝试从软件中心安装Synaptic软件包管理器。

或者只输入一个终端:sudo apt-get install synaptic

安装并打开该程序后,在“部分”选项卡中,找到“ KDE桌面环境”部分,然后选择所有已安装的(绿色)选择(Ctrl + Click)。然后右键单击,选择完全删除并通过单击窗口顶部的绿色复选标记来应用更改。

第四种思路

由于Braiams对我不起作用,所以我做了以下事情:

转到/var /log /apt并在history.log(或任何压缩的history.log。[n] .gz文件)中搜索”kubuntu-desktop”,以查找与kubuntu-desktop一起安装的确切软件包并删除它们。

第五种思路

这为我工作:

sudo apt-get install tasksel
sudo tasksel

在列表中找到Kubuntu桌面并删除其选择。阅读并确认道具。

在这之后我也做了

sudo apt-get autoremove

第六种思路

您可以使用apt-rdepends查找(元软件包)kubuntu-desktop已安装的所有软件包,并将该列表用作apt-get purge的输入。可能清除kdelibs *就足够了。

另一种可能性是删除Qt(即libqt4 *),因为KDE依赖于qt会删除所有KDE软件包。但是,如果在其他桌面上使用其他Qt应用程序,这将无法很好地工作。

但是,无论如何,都应非常仔细地检查apt-get要删除的软件包,因为这样可能会使整个安装混乱。

参考资料

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