Short version: "apt remove gdb-minimal" seems to have also removed plasma-desktop + a bunch of related packages.
Curious if there are any good debugging tips for figuring out what happened here. Or maybe I'm missing something obvious about how apt works, and this is expected behavior? Yesterday, I was trying to use gdb, and realized I had gdb-minimal installed instead of the regular gdb package. To fix this, I first ran "apt remove gdb-minimal". My assumption was that I then would have to run "apt install gdb". But turns out that invoking "gdb" after running "apt remove gdb-minimal", I had the full version of gdb installed. I didn't think more about it, went on using gdb and later shut down the computer. When I booted it today, a different display manager than what I usually have was shown. Switching to a different pseudoterminal and checking "/var/log/apt/history.log" showed that when I had removed gdb-minimal, for some reason plasma-desktop and some other packages had also been removed. This is the entry I saw: Start-Date: 2024-01-13 15:52:49 Commandline: apt remove gdb-minimal Requested-By: morten (1000) Install: gdb:amd64 (13.1-3, automatic), libsource-highlight-common:amd64 (3.1.9-4.2, automatic), libboost-regex1.74.0:amd64 (1.74.0+ds1-21, automatic), libc6-dbg:amd64 (2.36-9+deb12u3, automatic), libbabeltrace1:amd64 (1.5.11-1+b2, automatic), libsource-highlight4v5:amd64 (3.1.9-4.2+b3, automatic) Remove: kinfocenter:amd64 (4:5.27.5-2), plasma-workspace:amd64 (4:5.27.5-2+deb12u1), plasma-widgets-addons:amd64 (4:5.27.5-2), plasma-workspace-wayland:amd64 (4:5.27.5-2+deb12u1), sddm-theme-breeze:amd64 (4:5.27.5-2+deb12u1), sddm-theme-debian-breeze:amd64 (4:5.27.5-2+deb12u1), gdb-minimal:amd64 (13.1-3), kde-plasma-desktop:amd64 (5:142), plasma-desktop:amd64 (4:5.27.5-2) End-Date: 2024-01-13 15:52:52 (Looks like this is where regular gdb got installed too, so I didn't actually have it, it just got autoinstalled when I removed gdb-minimal?) (Also, probably this info got printed when I ran "apt remove gdb-minimal", and I was not paying attention.) To fix it, I ran this command and rebooted with "systemctl reboot", which seems to have worked fine. Now I'm back in the expected desktop environment. apt install kinfocenter plasma-workspace plasma-widgets-addons plasma-workspace-wayland sddm-theme-breeze sddm-theme-debian-breeze kde-plasma-desktop plasma-desktop Looking back in history.log, the only other references to gdb-minimal and plasma-desktop I could find was near the top of the file (15th entry): Start-Date: 2024-01-08 06:25:16 Commandline: apt-get -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 -q -y -o APT::Install-Recommends=true -o APT::Get::AutomaticRemove=true -o Acquire::Retries=3 install task-kde-desktop bind9-dnsutils dbus systemd-timesyncd apt-listchanges reportbug netcat-traditional debian-faq python3-reportbug man-db ncurses-term bash-completion bind9-host groff-base mime-support manpages bzip2 inetutils-telnet doc-debian krb5-locales lsof ucf wget libnss-systemd ca-certificates gettext-base perl wamerican openssh-client xz-utils traceroute file liblockfile-bin libpam-systemd media-types task-english task-desktop task-ssh-server Install: ... I've cut off the "Install :" part, because it continues for more than a screen. It contains both the kde-packages which were gone from my system, and gdb-minimal. I assume that this is from when I ran the debian installer on monday (fresh install). I appreciate any input, thanks in advance.