I removed ghostscript from my machine, but beside removing ghostscript it also ruined my GUI and messed up my network(machine had no internet). I was able to fix this, but I wonder what is the cause of this behavior. This is the update log:
1 Start-Date: 2019-11-28 14:11:57
2 Commandline: apt remove ghostscript
3 Requested-By: johnsmith (1000)
4 Install: libpaps0:amd64 (0.6.8-7.1, automatic), foomatic-filters:amd64 (4.0.17-11, automatic), paps:amd64 (0.6.8-7.1, automatic), libgpg-error-l10n:amd64 (1.35-1, automatic)
5 Upgrade: gnome-settings-daemon-common:amd64 (3.32.0-1ubuntu1, 3.32.1-0ubuntu1), language-selector-common:amd64 (0.194, 0.194.1), python3-distupgrade:amd64 (1:19.04.16, 1:19.04.16. 9), ubuntu-release-upgrader-core:amd64 (1:19.04.16, 1:19.04.16.9), libuuid1:amd64 (2.33.1-0.1ubuntu2, 2.33.1-0.1ubuntu3), libssl1.1:amd64 (1.1.1b-1ubuntu2, 1.1.1b-1ubuntu2.4), gno me-software-common:amd64 (3.30.6-2ubuntu3, 3.30.6-2ubuntu4.19.04.2)
6 Remove: network-manager-pptp:amd64 (1.2.8-2), netplan.io:amd64 (0.96-0ubuntu4), gnome-shell-extension-desktop-icons:amd64 (19.01.1-1), ubuntu-desktop-minimal:amd64 (1.431), printe r-driver-splix:amd64 (2.0.0+svn315-7fakesync1), gvfs-backends:amd64 (1.40.1-1ubuntu0.1), gnome-control-center:amd64 (1:3.32.1-1ubuntu4), friendly-recovery:amd64 (0.2.39), bluez-cu ps:amd64 (5.50-0ubuntu2), printer-driver-hpcups:amd64 (3.19.1+dfsg0-1), gnome-software-plugin-snap:amd64 (3.30.6-2ubuntu3), libpam-fprintd:amd64 (0.8.1-1), ubuntu-system-service:a md64 (0.4), fprintd:amd64 (0.8.1-1), rtkit:amd64 (0.12-4), snapd:amd64 (2.38+19.04), update-manager:amd64 (1:19.04.5), python3-aptdaemon.gtk3widgets:amd64 (1.1.1+bzr982-0ubuntu21) , gnome-software:amd64 (3.30.6-2ubuntu3), usb-creator-common:amd64 (0.3.5ubuntu19.04.1), ubuntu-standard:amd64 (1.431), ubuntu-session:amd64 (3.32.0-1ubuntu1), ubuntu-desktop:amd6 4 (1.431), gnome-settings-daemon:amd64 (3.32.0-1ubuntu1), plymouth-label:amd64 (0.9.4-1ubuntu1), printer-driver-pxljr:amd64 (1.4+repack0-5), usb-creator-gtk:amd64 (0.3.5ubuntu19.0 4.1), plymouth-theme-ubuntu-text:amd64 (0.9.4-1ubuntu1), network-manager-gnome:amd64 (1.8.20-1ubuntu1), gdm3:amd64 (3.32.0-1ubuntu1), iio-sensor-proxy:amd64 (2.5-0ubuntu1), networ k-manager:amd64 (1.16.0-0ubuntu2), packagekit-tools:amd64 (1.1.12-5), software-properties-gtk:amd64 (0.97.11), gnome-disk-utility:amd64 (3.32.1-1ubuntu1), apturl:amd64 (0.5.2ubunt u17), ubuntu-minimal:amd64 (1.431), nautilus-share:amd64 (0.7.3-2ubuntu3), cups-filters:amd64 (1.22.5-1), udisks2:amd64 (2.8.2-1), gvfs-fuse:amd64 (1.40.1-1ubuntu0.1), nautilus:am d64 (1:3.32.0-0ubuntu2), ubuntu-software:amd64 (3.30.6-2ubuntu3), printer-driver-sag-gdi:amd64 (0.1-7), network-manager-openvpn:amd64 (1.8.10-1), hplip:amd64 (3.19.1+dfsg0-1), pri nter-driver-gutenprint:amd64 (5.3.1-7build1), brltty:amd64 (5.6-10ubuntu1), libpam-systemd:amd64 (240-6ubuntu5.7), ghostscript:amd64 (9.26~dfsg+0-0ubuntu7.4), packagekit:amd64 (1. 1.12-5), gnome-shell-extension-appindicator:amd64 (28-1), ghostscript-x:amd64 (9.26~dfsg+0-0ubuntu7.4), libnss-systemd:amd64 (240-6ubuntu5.7), gnome-initial-setup:amd64 (3.32.1-1u buntu3), network-manager-config-connectivity-ubuntu:amd64 (1.16.0-0ubuntu2), plymouth:amd64 (0.9.4-1ubuntu1), printer-driver-pnm2ppa:amd64 (1.13+nondbs-0ubuntu6), policykit-1:amd6 4 (0.105-25), gvfs:amd64 (1.40.1-1ubuntu0.1), python3-aptdaemon:amd64 (1.1.1+bzr982-0ubuntu21), ubuntu-release-upgrader-gtk:amd64 (1:19.04.16), network-manager-openvpn-gnome:amd64 (1.8.10-1), gnome-shell:amd64 (3.32.0+git20190410-1ubuntu1), dbus-user-session:amd64 (1.12.12-1ubuntu1.1), aptdaemon:amd64 (1.1.1+bzr982-0ubuntu21), language-selector-gnome:amd64 (0.194), plymouth-theme-ubuntu-logo:amd64 (0.9.4-1ubuntu1), printer-driver-ptouch:amd64 (1.4.2-3), cups:amd64 (2.2.10-4ubuntu2.1), gstreamer1.0-packagekit:amd64 (1.1.12-5), netwo rk-manager-pptp-gnome:amd64 (1.2.8-2), update-notifier:amd64 (3.192.18), gvfs-daemons:amd64 (1.40.1-1ubuntu0.1), colord:amd64 (1.4.3-4), gnome-shell-extension-ubuntu-dock:amd64 (6 4ubuntu7)
7 End-Date: 2019-11-28 14:12:37
Printing is considered an essential component of a desktop environment. In Linux, postscript is central in printing. Probably put way to simple, when applications print, they generate postscript. Postscript is understood directly by postscript printer. For non-postscript printers, ghostscript is relied upon by the printer drivers to translate the postscript to the appropriate printing language. Ghostscript is also used by document viewers such as Evince to display postscript files. Because ghostscript is core to the operating system, removing it removes a lot of components of the standard Ubuntu desktop that depend on it.
Removing
ghostscript
also will have removed theubuntu-desktop
metapackage. You can conveniently restore your system by reinstallingubuntu-desktop
. Doing so will pull all packages back in that are considered core of an Ubuntu desktop.Buried in that big, long list is the
ubuntu-desktop
metapackage. That's important.The usual scenario for this kind of mass-removal is as folows:
ubuntu-desktop
(which requiresghostscript
), You could have installedubuntu-desktop
directly or by using tasksel.ubuntu-desktop
)The system includes an important safeguard to prevent unintended mass-removals: The confirmation dialog. I always recommend that folks read their apt output carefully before agreeing in order to prevent precisely this kind of surprise.
Additionally, the full-sized Ubuntu Desktop Installer includes another safeguard against mass-removal: It uses apt-mark to make all packages ineligible for autoremoval.
You can, obviously, restore your desktop stack by simply reinstalling the
ubuntu-desktop
package: