如何卸载Debian GNOME 环境中预安装的应用软件

How to uninstall the preinstalled GNOME applications

I just installed Debian "Bullseye" with GNOME, but it comes with a lot of unwanted applications which I want to remove. I went ahead and searched for the corresponding package names. I also checked if a given application can be removed in the software center.

Application Package Removing Method
2048 gnome-2048 Software Center
Advanced Network Configuration network-manager-gnome Terminal
AisleRiot Solitaire aisleriot Software Center
Archive Manager file-roller Terminal
Calculator gnome-calculator Terminal
Calender gnome-calendar Software Center
Characters gnome-characters Terminal
Cheese cheese Software Center
Chess gnome-chess Software Center
Clocks gnome-clocks Software Center
Color Profile Viewer gnome-color-manager Software Center
Contacts gnome-contacts Software Center
Disk Usage Analyzer baobab Terminal
Disks gnome-disk-utility Software Center
Document Scanner simple-scan Software Center
Document Viewer evince Terminal
Documents gnome-documents Software Center
Evolution evolution Software Center
Extensions gnome-shell-extension-prefs Software
Files nautilus Software Center
Firefox ESR firefox-esr Terminal
Five or More five-or-more Software Center
Fonts gnome-font-viewer Terminal
Four-in-a-row four-in-a-row Software Center
Help yelp Terminal
Hitori hitori Software Center
Image Viewer eog Terminal
Input Method im-config Software Center
Klotski gnome-klotski Software Center
LibreOffice libreoffice-common Terminal
LibreOffice Calc libreoffice-calc Software Center
LibreOffice Draw libreoffice-draw Software Center
LibreOffice Impress libreoffice-impress Software Center
LibreOffice Writer libreoffice-writer Software Center
Lights Off lightsoff Software Center
Logs gnome-logs Software Center
Mahjongg gnome-mahjongg Software Center
Maps gnome-maps Software Center
Mines gnome-mines Software Center
Music gnome-music Software Center
Nibbles gnome-nibbles Software Center
Parental Controls malcontent Software Center
Passwords and Keys seahorse Software Center
Quadrapassel quadrapassel Software Center
Reversi iagno Software Center
Rhythmbox rhythmbox Software Center
Robots gnome-robots Software Center
Screenshot gnome-screenshot Terminal
Shotwell shotwell Software Center
Software & Updates software-properties-gtk Software Center
Software gnome-software Terminal
Sound Recorder gnome-sound-recorder Software Center
Sudoku gnome-sudoku Software Center
Swell Foop swell-foop Software Center
Synaptic Package Manager synaptic Software Center
System Monitor gnome-system-monitor Terminal
Tali tali Software Center
Taquin gnome-taquin Software Center
Terminal gnome-terminal Terminal
Tetravex gnome-tetravex Software Center
Text Editor gedit Terminal
To Do gnome-todo Software Center
Transmission transmission-gtk Software Center
Tweaks gnome-tweaks Software Center
Videos totem Terminal
Weather gnome-weather Software Center

The following command purges every application that could be removed in the software center:

apt purge aisleriot cheese evolution five-or-more four-in-a-row gnome-2048 gnome-calendar gnome-chess gnome-clocks gnome-color-manager gnome-contacts gnome-disk-utility gnome-documents gnome-klotski gnome-logs gnome-mahjongg gnome-maps gnome-mines gnome-music gnome-nibbles gnome-robots gnome-sound-recorder gnome-shell-extension-prefs gnome-sudoku gnome-taquin gnome-tetravex gnome-todo gnome-tweaks gnome-weather hitori iagno im-config libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-writer lightsoff malcontent nautilus quadrapassel rhythmbox seahorse shotwell simple-scan software-properties-gtk swell-foop synaptic tali transmission-gtk

This additional command purges the applications that can only be removed through the terminal. (I didn't include network-manager-gnome and gnome-terminal since removing these will cause a lot of annoyance.)

apt purge baobab eog evince file-roller firefox-esr gedit gnome-calculator gnome-characters gnome-font-viewer gnome-screenshot gnome-software gnome-system-monitor libreoffice-common totem yelp

Finally, the following command combines the two above:

apt purge aisleriot baobab cheese eog evince evolution file-roller firefox-esr five-or-more four-in-a-row gedit gnome-2048 gnome-calculator gnome-calendar gnome-characters gnome-chess gnome-clocks gnome-color-manager gnome-contacts gnome-disk-utility gnome-documents gnome-font-viewer gnome-klotski gnome-logs gnome-mahjongg gnome-maps gnome-mines gnome-music gnome-nibbles gnome-robots gnome-screenshot gnome-software gnome-sound-recorder gnome-shell-extension-prefs gnome-sudoku gnome-system-monitor gnome-taquin gnome-tetravex gnome-todo gnome-tweaks gnome-weather hitori iagno im-config libreoffice-calc libreoffice-common libreoffice-draw libreoffice-impress libreoffice-writer lightsoff malcontent nautilus quadrapassel rhythmbox seahorse shotwell simple-scan software-properties-gtk swell-foop synaptic tali totem transmission-gtk yelp 

Is there a better way to achieve a minimal install than running the commands above?

The answer is :


The gnome metapackage is not aimed at providing a minimal install, but a full install, with an office suite, photo viewers, games, etc.

@mashuptwice has a good comment that will work for an installation "from-scratch", but it's possible to get into that same state without re-installing your machine.

I had experienced previously that uninstalling evolution will uninstall the packages that depend on it (i.e. gnome). Doing that will mark other dependencies (e.g. gnome-core) for autoremoval unless they are explicitly marked as manually installed.

If you want the Gnome desktop environment without the "extra components", take a look at the Depends:Recommends: and Suggests: section and choose which parts you want to manually install:

$ apt show gnome
Package: gnome
Section: metapackages
...
Depends: 
 gnome-core, 
 desktop-base, 
 network-manager-gnome,
 libproxy1-plugin-networkmanager,
 cheese,
 file-roller,
 gnome-calendar,
 gnome-clocks,
 gnome-color-manager,
 gnome-documents,
 gnome-maps,
 gnome-music,
 shotwell | gnome-photos,
 gnome-screenshot,
 gnome-todo,
 gnome-weather,
 orca,
 rygel-playbin,
 rygel-tracker,
 simple-scan,
 avahi-daemon,
 evolution,
 gnome-sound-recorder,
 gnome-tweaks,
 libreoffice-gnome,
 libreoffice-writer,
 libreoffice-calc,
 libreoffice-impress,
 libgsf-bin,
 rhythmbox,
 seahorse,
 xdg-user-dirs-gtk,
 cups-pk-helper,
 evolution-plugins,
 gedit-plugins,
 gstreamer1.0-libav,
 gstreamer1.0-plugins-ugly,
 rhythmbox-plugins,
 rhythmbox-plugin-cdrecorder,
 totem-plugins
Recommends: 
 nautilus-extension-brasero,
 gnome-remote-desktop,
 gnome-games,
 transmission-gtk
Suggests:
 alacarte,
 empathy,
 goobox | sound-juicer,
 polari,
 vinagre,
 webext-ublock-origin,
 firefox-esr-l10n-all | firefox-l10n-all

Steps:

  1. Choose the components you want,
  2. Either sudo apt install ... or sudo apt-mark manual ... each of these components. This will mark them as "manually installed".
  3. sudo apt purge gnome to remove the gnome metapackage.
  4. sudo apt autoremove to remove all of gnome's dependencies which were not manually installed.

You'll note that things like gnome-chess are not listed in the dependencies here. They are further down the tree (brought in by gnome-games). You probably don't want to deal with dependencies of dependencies, that's frustrating. Just deal with the metapackage and everything else will be taken care of.

你可能感兴趣的:(Debian服务器系统,命令行安装桌面,笔记,卸载预安装软件,Debian,Gnome)