On 2024-01-14 08:54 +0100, Morten Hauke Solvang wrote: > 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".
That assumption was a bit misguided. The correct way would have been to "apt install gdb" _without_ first removing gdb-minimal, that would have avoided the removal of reverse dependencies. > 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?) Apparently, although it is not clear why because apt also went on to remove plasma-workspace and its reverse dependencies. The plasma-workspace package depends on gdb-minimal | gdb, that is why gdb-minimal was installed in the first place. > (Also, probably this info got printed when I ran "apt remove > gdb-minimal", and I was not paying attention.) Pretty sure not only was this information printed, apt also asks for confirmation if it has to install or remove more packages than requested. But it did what you told it to do, although the outcome might not have been what you desired. > 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 Good you sorted it out. The only question is why apt installed gdb even though it removed plasma-workspace anyway. When I tried to replicate your situation in a bookworm chroot, "apt remove gdb-minimal" removes plasma-workspace but does not install gdb. Cheers, Sven