What happened?
This happened:
$ apt -s purge gnome-shell-common
NOTE: This is only a simulation!
apt needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
notification-daemon policykit-1-gnome
The following packages will be REMOVED:
chrome-gnome-shell* gdm3* gnome-shell* gnome-shell-common*
gnome-shell-extension-appindicator* gnome-shell-extension-desktop-icons-ng*
gnome-shell-extension-manager* gnome-shell-extension-prefs*
gnome-shell-extension-system-monitor* gnome-shell-extension-ubuntu-dock*
gnome-shell-extensions* gnome-tweaks* ubuntu-desktop*
ubuntu-desktop-minimal* ubuntu-session*
The following NEW packages will be installed:
notification-daemon policykit-1-gnome
0 to upgrade, 2 to newly install, 15 to remove and 30 not to upgrade.
Purg chrome-gnome-shell [10.1-5]
Purg ubuntu-desktop [1.481]
Purg ubuntu-desktop-minimal [1.481]
Purg gdm3 [42.0-1ubuntu7.22.04.2]
Purg gnome-shell-extension-prefs [42.5-0ubuntu1]
Inst policykit-1-gnome (0.105-7ubuntu3 Ubuntu:22.04/jammy [amd64])
Inst notification-daemon (3.20.0-4build1 Ubuntu:22.04/jammy [amd64])
Purg gnome-shell-extension-system-monitor [40-1]
Purg gnome-shell [42.5-0ubuntu1] [gnome-shell-extensions:amd64 gnome-shell-extension-desktop-icons-ng:amd64 gnome-shell-extension-appindicator:amd64 ubuntu-session:amd64 gnome-shell-extension-manager:amd64 gnome-shell-extension-ubuntu-dock:amd64 ]
Purg gnome-tweaks [42~beta-1ubuntu2] [gnome-shell-extensions:amd64 gnome-shell-extension-desktop-icons-ng:amd64 gnome-shell-extension-appindicator:amd64 ubuntu-session:amd64 gnome-shell-extension-manager:amd64 gnome-shell-extension-ubuntu-dock:amd64 ]
Purg gnome-shell-common [42.5-0ubuntu1] [gnome-shell-extensions:amd64 gnome-shell-extension-desktop-icons-ng:amd64 gnome-shell-extension-appindicator:amd64 ubuntu-session:amd64 gnome-shell-extension-manager:amd64 gnome-shell-extension-ubuntu-dock:amd64 ]
Purg gnome-shell-extension-appindicator [42-2~fakesync1] [gnome-shell-extensions:amd64 gnome-shell-extension-desktop-icons-ng:amd64 ubuntu-session:amd64 gnome-shell-extension-manager:amd64 gnome-shell-extension-ubuntu-dock:amd64 ]
Purg gnome-shell-extension-desktop-icons-ng [43-2ubuntu1] [gnome-shell-extensions:amd64 ubuntu-session:amd64 gnome-shell-extension-manager:amd64 gnome-shell-extension-ubuntu-dock:amd64 ]
Purg gnome-shell-extension-manager [0.3.0-0ubuntu2.1] [gnome-shell-extensions:amd64 ubuntu-session:amd64 gnome-shell-extension-ubuntu-dock:amd64 ]
Purg gnome-shell-extension-ubuntu-dock [72~ubuntu5.22.04.1] [gnome-shell-extensions:amd64 ubuntu-session:amd64 ]
Purg gnome-shell-extensions [42.1-0ubuntu1] [ubuntu-session:amd64 ]
Purg ubuntu-session [42.0-1ubuntu2]
Conf policykit-1-gnome (0.105-7ubuntu3 Ubuntu:22.04/jammy [amd64])
Conf notification-daemon (3.20.0-4build1 Ubuntu:22.04/jammy [amd64])
The desktop environment's essential main meta-package(ubuntu-desktop
) among other packages were removed.
How to fix?
Reinstall the removed packages starting with ubuntu-desktop
i.e.:
sudo apt install --reinstall ubuntu-desktop
And so on.
If your system doesn't automatically boot to a terminal, then do that from the recovery mode or from a live system with chroot
.
How to avoid this in the future?
Read the list of packages to be removed carefully before answering yes ... Needless to say you shouldn't arbitrarily follow anonymous advice on the internet to copy/paste and execute commands that you don't know their effect on your system.