删除 KDE 并切换到 CLI

删除 KDE 并切换到 CLI

今天早上我在服务器上安装了 Ubuntu Server 14.04,我认为运行 GUI 会很酷。尽管它占用了太多内存,我不喜欢。我怎样才能永久恢复到 CLI?还有我怎样才能删除 KDE 让它永远不存在?

我已尝试过sudo apt-get remove kubuntu-desktop && sudo apt-get remove autoclean但它仍然存在。

答案1

通过重新安装,这是删除 kubuntu 桌面包最安全的方法:

sudo apt-get install aptitude ubuntu-minimal
sudo aptitude remove '?and(?reverse-depends(kubuntu)),?not(?reverse-depends(?exact-name(ubuntu-minimal))))'

这将使您的系统保留 Ubuntu 的最小安装,足以启动,而不需要 Kubuntu 软件包。

解释 aptitude 的作用:

  • ?and(conditional1, conditional2):搜索所有满足两个条件的包。
  • ?reverse-depends(package):搜索所有包含该包的反向依赖的包package
  • ?not(package):搜索不满足此条件的包。
  • ?exact-name(package):使用?name()它时搜索任何包含名称的包,例如它会找到packagelibpackage0package-gui。用?exact-name它指定应该是确切的名称,相当于^package$正则表达式。

如果我们用简单的英语来解释它:aptitude,remove任何具有反向依赖kubuntu有一个包,它的名字中包含不是反向依赖具有精确名称的包ubuntu-minimal

答案2

如果您今天早上才安装,请重新安装。这是获得完美清白的最简单方法(也是很好的练习)。

答案3

在终端:

 sudo apt-get --purge remove kubuntu-desktop

- 清除标记您正在删除该包的所有配置

sudo apt-get autoremove

删除所有依赖于 kubuntu-desktop 的孤立软件包

参考地点

或者尝试这个:

sudo apt-get purge --auto-remove akonadi-backend-mysql akonadi-server docbook-xsl dolphin freespacenotifier gpsd  icoutils kate-data katepart kde-baseapps kde-baseapps-bin kde-baseapps-data  kde-plasma-desktop kde-runtime kde-runtime-data kde-style-oxygen  kde-wallpapers-default kde-window-manager kde-window-manager-common  kde-workspace kde-workspace-bin kde-workspace-data kde-workspace-kgreet-plugins  kdelibs-bin kdelibs5-data kdelibs5-plugins kdepasswd kdepim-runtime  kdepimlibs-kio-plugins kdm kdoctools kfind kinfocenter klipper kmenuedit  konqueror konqueror-nsplugins konsole ksysguard ksysguardd  kubuntu-debug-installer kwrite libakonadi-calendar4 libakonadi-contact4  libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4  libakonadi-notes4 libakonadiprotocolinternals1 libattica0.3  libboost-program-options1.46.1 libcln6 libclucene0ldbl libdlrestrictions1  libdmtx0a libencode-locale-perl libfile-listing-perl libfont-afm-perl libgps20  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 libilmbase6 libio-socket-inet6-perl  libio-socket-ssl-perl libkabc4 libkactivities-bin libkactivities6 libkalarmcal2  libkatepartinterfaces4 libkcal4 libkcalcore4 libkcalutils4 libkcmutils4  libkde3support4 libkdeclarative5 libkdecorations4 libkdecore5 libkdesu5  libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkephal4abi1 libkfile4  libkholidays4 libkhtml5 libkidletime4 libkimap4 libkio5 libkjsapi4 libkjsembed4  libkldap4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff3-4 libknotifyconfig4  libkntlm4 libkonq-common libkonq5-templates libkonq5abi1 libkonqsidebarplugin4a  libkparts4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkpty4  libkresources4 libkrosscore4 libkscreensaver5 libksgrd4 libksignalplotter4  libktexteditor4 libkunitconversion4 libkwineffects1abi3 libkwinglutils1  libkwinnvidiahack4 libkworkspace4abi1 liblwp-mediatypes-perl  liblwp-protocol-https-perl libmailtools-perl libmailtransport4 libmicroblog4  libnepomuk4 libnepomukdatamanagement4 libnepomukquery4a libnepomuksync4  libnepomukutils4 libnet-http-perl libnet-ssleay-perl libntrack-qt4-1 libntrack0  libopenexr6 libphonon4 libplasma-geolocation-interface4 libplasma3  libplasmaclock4abi3 libplasmagenericshell4 libpolkit-qt-1-1 libprison0  libprocesscore4abi1 libprocessui4a libqalculate5 libqapt-runtime libqapt1  libqca2 libqimageblitz4 libqrencode3 libqt4-qt3support libsocket6-perl libsolid4  libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libsoprano4 libstreamanalyzer0  libstreams0 libsyndication4 libtaskmanager4abi3 libthreadweaver4  libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl  libwww-robotrules-perl libxml2-utils libxss1 mysql-client-core-5.5  mysql-server-core-5.5 ntrack-module-libnl-0 odbcinst odbcinst1debian2  oxygen-cursor-theme oxygen-icon-theme phonon phonon-backend-gstreamer  plasma-dataengines-workspace plasma-desktop plasma-scriptengine-javascript  plasma-widget-folderview plasma-widgets-workspace qapt-batch  shared-desktop-ontologies soprano-daemon systemsettings virtuoso-minimal  virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common

相关内容