如何从 Ubuntu 20.04 LTS 中删除 GNOME Shell 以从头开始安装其他桌面环境?

N0r*_*ert 21 gnome gnome-panel productivity gnome-shell 20.04

我刚刚从ubuntu-20.04-desktop-amd64.iso安装了 Ubuntu 20.04 LTS 桌面系统的最终版本。
经过两天的测试,我完全不喜欢它的图形界面——GNOME Shell。
即使安装 GNOME Flashback 也无济于事。

所以我想从我的系统中完全删除 GNOME Shell 及其所有路径,而无需重新安装。
只是想从头开始,就像我从最小网络启动 ISO安装 Ubuntu 一样。

N0r*_*ert 23

删除 GNOME Shell 的单个长命令如下

sudo apt purge adwaita-icon-theme gedit-common gir1.2-gdm-1.0 \
gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0 gir1.2-goa-1.0 \
gnome-accessibility-themes gnome-bluetooth gnome-calculator gnome-calendar \
gnome-characters gnome-control-center gnome-control-center-data \
gnome-control-center-faces gnome-desktop3-data \
gnome-font-viewer gnome-getting-started-docs gnome-getting-started-docs-ru \
gnome-initial-setup gnome-keyring gnome-keyring-pkcs11 gnome-logs \
gnome-mahjongg gnome-menus gnome-mines gnome-online-accounts \
gnome-power-manager gnome-screenshot gnome-session-bin gnome-session-canberra \
gnome-session-common gnome-settings-daemon gnome-settings-daemon-common \
gnome-shell gnome-shell-common gnome-shell-extension-appindicator \
gnome-shell-extension-desktop-icons gnome-shell-extension-ubuntu-dock \
gnome-startup-applications gnome-sudoku gnome-system-monitor gnome-terminal \
gnome-terminal-data gnome-themes-extra gnome-themes-extra-data gnome-todo \
gnome-todo-common gnome-user-docs gnome-user-docs-ru gnome-video-effects \
language-pack-gnome-en language-pack-gnome-en-base language-pack-gnome-ru \
language-pack-gnome-ru-base language-selector-gnome libgail18 libgail18 \
libgail-common libgail-common libgnome-autoar-0-0 libgnome-bluetooth13 \
libgnome-desktop-3-19 libgnome-games-support-1-3 libgnome-games-support-common \
libgnomekbd8 libgnomekbd-common libgnome-menu-3-0 libgnome-todo libgoa-1.0-0b \
libgoa-1.0-common libpam-gnome-keyring libsoup-gnome2.4-1 libsoup-gnome2.4-1 \
nautilus-extension-gnome-terminal pinentry-gnome3 yaru-theme-gnome-shell

sudo apt autopurge
Run Code Online (Sandbox Code Playgroud)

注意:如果之前手动安装了 Vanilla GNOME 桌面sudo apt install vanilla-gnome-desktop和/或 Ubuntu GNOME 桌面sudo apt install ubuntu-gnome-desktop和/或 GNOME FlashBacksudo apt install gnome-flashback gnome-panel和/或完整的 GNOME sudo apt install gnome- 必须执行以下额外的删除命令:

sudo apt purge adwaita-icon-theme geogebra-gnome gir1.2-gtd-1.0 \
gnome-accessibility-profiles gnome-applets-data gnome-audio gnome-backgrounds \
gnome-cards-data gnome-common gnome-desktop-testing gnome-dvb-daemon \
gnome-exe-thumbnailer gnome-extra-icons gnome-flashback-common \
gnome-humility-icon-theme gnome-hwp-support gnome-icon-theme \
gnome-icon-theme-gartoon gnome-icon-theme-gartoon-redux \
gnome-icon-theme-gperfection2 gnome-icon-theme-nuovo gnome-icon-theme-suede \
gnome-icon-theme-yasis gnome-mime-data gnome-nds-thumbnailer \
gnome-packagekit-data gnome-panel-control gnome-panel-data \
gnome-pkg-tools gnome-recipes-data gnome-remote-desktop gnome-settings-daemon-dev \
gnome-shell-pomodoro-data gnome-software-common gnome-software-doc \
gnome-theme-gilouche gnome-video-effects-extra gnome-video-effects-frei0r \
guile-gnome2-dev guile-gnome2-glib libgnome-autoar-doc libgnomecanvas2-common \
libgnomecanvas2-doc libgnomecanvasmm-2.6-doc libgnome-panel-doc libgnome-todo-dev \
libopenrawgnome7:amd64 libopenrawgnome-dev libreoffice-gnome libxine2-gnome:amd64 \
nautilus-sendto pidgin-gnome-keyring plymouth-theme-ubuntu-gnome-logo \
plymouth-theme-ubuntu-gnome-text ubuntu-gnome-wallpapers \
ubuntu-gnome-wallpapers-trusty ubuntu-gnome-wallpapers-utopic \
ubuntu-gnome-wallpapers-xenial ubuntu-gnome-wallpapers-yakkety

sudo apt autopurge
Run Code Online (Sandbox Code Playgroud)

然后可以使用以下命令安装任何感兴趣的桌面环境:

  • 肉桂 - sudo apt install cinnamon-desktop-environment
  • KDE 在 Kubuntu 中 - sudo apt install kubuntu-desktop^
  • MATE 就像在 Ubuntu MATE 中一样 - sudo apt install ubuntu-mate-desktop^
  • 团结—— sudo apt install ubuntu-unity-desktop
  • 在Xubuntu中的Xfce - sudo apt install xubuntu-desktop^

然后重新启动,选择新安装的桌面会话并登录。


注意:此方法也适用于 Ubuntu 20.10 和 21.04。

  • 指出这如何以及为什么与传统的使用方法有很大不同可能会有所帮助:`sudo apt-get remove ubuntu-gnome-desktop` 记录在:[如何在 Ubuntu 15.04 上卸载 ubuntu-gnome-desktop ](https://installlion.com/ubuntu/vivid/universe/u/ubuntu-gnome-desktop/uninstall/index.html) 其他人也可能会喜欢一个简短的总结,说明为什么 Ubuntu 偏离了更简单的方法。 (2认同)
  • 我刚刚在那里发布了一个答案。我无法测试您的答案,但担心对许多用户来说这可能太复杂了。我确实为你的 Q+A 投了赞成票,因为他们付出了辛勤的努力。 (2认同)
  • @0xC0000022L 我不知道`apt autopurge`,谢谢!它是非常新的 - 它在 [apt 1.9.11](https://sources.debian.org/src/apt/2.1.6/debian/changelog/?hl=163#L160) 中引入,因此它包含在 20.04 中LTS。我已经从 *ubuntu-20.04-desktop-amd64.iso* 安装了桌面,但稍后我可能会添加普通的 GNOME 删除。 (2认同)