如果我决定不坚持使用KDE,如何从Ubuntu中删除KDE?


12

我一直在尝试在Ubuntu 9.04上安装kubuntu-kde4-desktop软件包,这给了KDE一定的帮助。我还没有完成它,但是如果我决定返回我尝试过的,真正喜欢的Gnome设置,我如何轻松地删除KDE东西而不必跟踪Synaptic中的所有组件?

我了解到kubuntu-kde4-desktop是一个元软件包,可作为完整KDE桌面体验所需的所有软件包的指针,因此,我认为我不能简单地做到这一点:

$ sudo apt-get remove kubuntu-kde4-desktop

如果我决定不以一种简单的命令方式使用它,该如何删除它们?

更新:我在这里添加了与此问题相反的内容。

Answers:


10

$ sudo apt-get remove kubuntu-kde4-desktop

$ sudo apt-get autoremove

将删除所有它拉到依赖的软件包。Alteratively,如果你使用aptitude像这样

$ sudo aptitude remove kubuntu-kde4-desktop

它将自动为您删除所有依赖包。就我个人而言,我更喜欢手动控制apt-get,它会告诉您何时有可以下次使用的软件包可以自动删除。


1
真好 不知道自动删除。
jweede

2
使用这些任后,运行该删除的配置文件和其他零碎所遗留的:aptitude purge ~c~c寻找aptitude的发现被删除的,但不清除任何软件包。因此,您在这种状态下正在清除任何东西。记住进行清理是一个很好的命令。
Telemachus

3
sudo apt-get --purge remove kubuntu-kde4-desktop

应该执行完全删除。

--purge新增了删除不再使用的软件包的配置文件的功能。但是正如TRS-80所指出的那样,autoremove此后应使用该命令来消除不必要的依赖关系。


那完全不能像您描述的那样工作。该kubuntu-kde4-desktop软件包本身没有配置文件,因为它是一个元软件包。而autoremove在第二个命令将不会对所有的自动删除的包清除配置文件。我个人发现,处理残留配置的最简单方法是忽略它们,除非它们妨碍了它们,然后使用Synaptic定期清除它们。
瑞安·汤普森

2

正如其他人指出的那样,您可以将apt-get与--purge remove和autoremove / autoclean选项一起使用。

您还可以使用deborphan命令(一个单独的程序包)来识别孤立的程序包,并删除已识别的程序包,以便:

sudo apt-get --purge remove `deborphan`

一个更全面的程序是debfoster(除草不必要的Debian软件包),我经常运行它来保持系统整洁。关于debfoster的一个相当古老的HOWTO向您展示了如何使用仍然相关的说明摆脱所有 KDE软件包。

运行中的一小段debfoster代码(我最近用它清除了系统中的日食和相关软件包)。请注意,您可以将一个包作为参数传递给它。

我会定期尝试并丢弃软件,而debfoster对于确保我将有害软件包的膨胀降至最低程度非常有用。

$ sudo debfoster

ubuntu-desktop is keeping the following 194 packages installed:
  acpi-support acpid apmd app-install-data-partner apport apport-gtk at-spi avahi-autoipd bluez-utils brltty brltty-x11
  checkbox checkbox-gtk compiz compiz-fusion-plugins-extra compiz-fusion-plugins-main contact-lookup-applet cupsddk
  cupsddk-drivers dc dcraw dmz-cursor-theme dnsmasq-base ekiga eog ethtool evolution-exchange evolution-indicator
  example-content fast-user-switch-applet fglrx-modaliases file-roller finger firefox-3.0-gnome-support
  firefox-gnome-support foo2zjs foomatic-db-hpijs gcalctool gdm gdm-guest-session gedit gedit-common
  gnome-accessibility-themes gnome-cards-data gnome-codec-install gnome-games gnome-games-data gnome-mag gnome-nettool
  gnome-orca gnome-power-manager gnome-screensaver gnome-session-canberra gnome-system-tools gnome-themes-selected
  gnome-themes-ubuntu gstreamer0.10-plugins-base-apps gstreamer0.10-schroedinger gstreamer0.10-tools gtk2-engines
  gtk2-engines-murrine gucharmap gvfs-fuse hal-cups-utils hotkey-setup hpijs hplip hplip-data human-icon-theme human-theme
  im-switch inputattach jockey-common jockey-gtk language-selector language-selector-common laptop-mode-tools lftp
  libavahi-ui0 libbrlapi0.5 libcolamd-3.2.0 libcryptui0 libdmx1 libggz2 libggzcore9 libggzmod4 libgmime2.2a-cil
  libgnome-mag2 libgnomepanel2.24-cil libgnomevfs2-bin libgtk-vnc-1.0-0 libieee1284-3 libmbca0 libnm-glib0 libnm-util1
  libopal3.6.1 libotr2 libpt2.6.1 libpt2.6.1-plugins-alsa libpt2.6.1-plugins-v4l2 libsane libscim8c2a libsnmp-base libsnmp15
  libusplash0 libwmf0.2-7-gtk libwpg-0.1-1 linux-headers-2.6.28-15 linux-headers-2.6.28-15-generic linux-headers-generic
  lp-solve min12xxw mobile-broadband-provider-info mscompress nautilus-sendto nautilus-share network-manager
  network-manager-gnome notify-osd nvidia-173-modaliases nvidia-180-modaliases nvidia-71-modaliases nvidia-96-modaliases
  nvidia-common onboard openoffice.org-calc openoffice.org-draw openoffice.org-gnome openoffice.org-gtk
  openoffice.org-impress openprinting-ppds pcmciautils pidgin pidgin-libnotify pidgin-otr pnm2ppa pxljr python-brlapi
  python-cups python-cupshelpers python-gtksourceview2 python-pyatspi python-smbc python-usb python-virtkey readahead
  rss-glx sane-utils scim scim-bridge-agent scim-bridge-client-gtk scim-gtk2-immodule scim-modules-socket
  screensaver-default-images seahorse seahorse-plugins splix ssh-askpass-gnome syslinux system-config-printer-common
  system-config-printer-gnome tangerine-icon-theme tomboy toshset tsclient ttf-arabeyes ttf-arphic-uming ttf-lao
  ttf-sazanami-gothic ttf-thai-tlwg ubuntu-artwork ubuntu-docs ubuntu-gdm-themes ubuntu-sounds ubuntu-wallpapers
  update-manager update-notifier usb-creator usplash usplash-theme-ubuntu vinagre vino whois wireless-tools wpasupplicant
  xcursor-themes xdg-user-dirs-gtk xfonts-100dpi xfonts-75dpi xfonts-scalable xinput xorg xscreensaver-data xscreensaver-gl
Keep ubuntu-desktop? [Ynpsiuqx?], [H]elp: Y

eclipse-cdt is keeping the following 77 packages installed:
  ant ant-gcj ant-optional ant-optional-gcj antlr default-jdk default-jre ecj ecj-gcj eclipse eclipse-gcj eclipse-jdt
  eclipse-jdt-gcj eclipse-pde eclipse-pde-gcj eclipse-platform eclipse-platform-gcj eclipse-rcp eclipse-rcp-gcj
  eclipse-source fastjar gappletviewer-4.3 gcj-4.2-base gcj-4.3 gcj-4.3-base gij-4.2 gij-4.3 gjdoc java-gcj-compat
  java-gcj-compat-dev java-gcj-compat-headless junit junit4 libantlr-java libantlr-java-gcj libbcel-java
  libcommons-beanutils-java libcommons-collections-java libcommons-collections3-java libcommons-dbcp-java
  libcommons-digester-java libcommons-el-java libcommons-launcher-java libcommons-logging-java libcommons-modeler-java
  libcommons-pool-java libecj-java libecj-java-gcj libgcj-bc libgcj-common libgcj8-1 libgcj8-1-awt libgcj8-jar libgcj9-0
  libgcj9-0-awt libgcj9-dev libgcj9-jar libgcj9-src libjaxp1.3-java libjaxp1.3-java-gcj libjsch-java liblog4j1.2-java
  liblog4j1.2-java-gcj liblucene-java liblucene-java-doc libmx4j-java libregexp-java libservlet2.3-java libservlet2.4-java
  libswt3.2-gtk-gcj libswt3.2-gtk-java libswt3.2-gtk-jni libtomcat5.5-java libxerces2-java libxerces2-java-gcj libxt-dev
  openjdk-6-jdk
Keep eclipse-cdt? [Ynpsiuqx?], [H]elp: H

  Yes        Keep eclipse-cdt. [default]
  No         Delete eclipse-cdt.
  Prune      Delete eclipse-cdt and the packages it is keeping installed.
  Skip       Skip this question.
  Help       Print this message.
  Info or ?  Show information about eclipse-cdt.
  Undo       Undo last response.
  Quit       Exit without removing packages.
  Exit       Remove unwanted packages and exit.

Keep eclipse-cdt? [Ynpsiuqx?], [H]elp: P

libpanelappletmm-2.6-dev is keeping the following 9 packages installed:
  libcairomm-1.0-dev libgconfmm-2.6-dev libglibmm-2.4-dev libgnomemm-2.6-dev libgtkmm-2.4-dev libpanel-applet2-dev
  libpanelappletmm-2.6-1c2 libpangomm-1.4-dev libsigc++-2.0-dev
Keep libpanelappletmm-2.6-dev? [Ynpsiuqx?], [H]elp: S

编辑:一个很好的链接,了解有关deborphan的用法。Debfoster 的简要说明


deborphan除其他外会返回diff和其他必要的软件包-因此,我不建议您使用它。
Grzenio,
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.