0

I was trying to install a package from source and it asked me to install cmake. I did so, but the install had other errors so I gave up and did a snap remove cmake.

Now when I run apt (or muon), it says it wants to uninstall KDE-desktop and xorg. These are metapackages and it looks like uninstalling them will delete a lot of my system.

I just did a reboot for other reasons and my system still appears to be intact.

Is there some way I can undo this without starting a fresh install? I do a lot of user level customization and I don't want to have to start over.

How can I undo this?

System is Kubuntu 22.04 on an HP notebook with an Intel(R) Celeron(R) CPU N3150 @ 1.60GHz.

This is my backup notebook. The screen on my main one is dying and I don't have the funds to replace that notebook right now. This one is a little slow, but it has been working fine for me.

Edit ----

shelelia@blue:~/pq$ sudo apt install -f
[sudo] password for shelelia: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

shelelia@blue:~/pq$ sudo apt-get full-upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: x11-apps x11-session-utils xinit Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: kubuntu-desktop xorg The following packages have been kept back: base-files distro-info language-pack-en language-pack-en-base language-pack-gnome-en language-pack-gnome-en-base libegl-mesa0 libgbm1 libgl1-amber-dri libgl1-mesa-dri libglapi-mesa libglx-mesa0 python-apt-common python3-apt python3-distro-info python3-distupgrade ubuntu-release-upgrader-core ubuntu-release-upgrader-qt 0 upgraded, 0 newly installed, 2 to remove and 18 not upgraded. After this operation, 100 kB disk space will be freed. Do you want to continue? [Y/n] n Abort.

Edit ----

This is in /var/log/apt/history.log.

It shows the packages getting removed and subsequently reinstalled, but doesn't include anything about why any actions occurred.

Start-Date: 2023-08-04  09:20:00
Upgrade: libpoppler-qt5-1:amd64 (22.02.0-2ubuntu0.1, 22.02.0-2ubuntu0.2), libgpgmepp6:amd64 (1.16.0-1.2ubuntu4, 1.16.0-1.2ubuntu4.1), libgtk-4-common:amd64 (4.6.6+ds-0ubuntu1, 4.6.9+ds-0ubuntu0.22.04.1), libpoppler-cpp0v5:amd64 (22.02.0-2ubuntu0.1, 22.02.0-2ubuntu0.2), libxatracker2:amd64 (22.2.5-0ubuntu0.1~22.04.3, 23.0.4-0ubuntu1~22.04.1), libegl1-mesa:amd64 (22.2.5-0ubuntu0.1~22.04.3, 23.0.4-0ubuntu1~22.04.1), libgpgme11:amd64 (1.16.0-1.2ubuntu4, 1.16.0-1.2ubuntu4.1), mesa-va-drivers:amd64 (22.2.5-0ubuntu0.1~22.04.3, 23.0.4-0ubuntu1~22.04.1), poppler-utils:amd64 (22.02.0-2ubuntu0.1, 22.02.0-2ubuntu0.2), libgl1-mesa-glx:amd64 (22.2.5-0ubuntu0.1~22.04.3, 23.0.4-0ubuntu1~22.04.1), libpoppler-glib8:amd64 (22.02.0-2ubuntu0.1, 22.02.0-2ubuntu0.2), libpoppler118:amd64 (22.02.0-2ubuntu0.1, 22.02.0-2ubuntu0.2), mesa-vulkan-drivers:amd64 (22.2.5-0ubuntu0.1~22.04.3, 23.0.4-0ubuntu1~22.04.1), python3-gpg:amd64 (1.16.0-1.2ubuntu4, 1.16.0-1.2ubuntu4.1), libqgpgme7:amd64 (1.16.0-1.2ubuntu4, 1.16.0-1.2ubuntu4.1), brave-browser:amd64 (1.56.14, 1.56.20), libgtk-4-1:amd64 (4.6.6+ds-0ubuntu1, 4.6.9+ds-0ubuntu0.22.04.1), libgtk-4-bin:amd64 (4.6.6+ds-0ubuntu1, 4.6.9+ds-0ubuntu0.22.04.1), mesa-vdpau-drivers:amd64 (22.2.5-0ubuntu0.1~22.04.3, 23.0.4-0ubuntu1~22.04.1)
Remove: kubuntu-desktop:amd64 (1.418.1), xorg:amd64 (1:7.7+23ubuntu2)
End-Date: 2023-08-04  09:21:17

Start-Date: 2023-08-04 09:31:26 Install: kubuntu-desktop:amd64 (1.418.1), xorg:amd64 (1:7.7+23ubuntu2, automatic) End-Date: 2023-08-04 09:31:29

term.log has the same information in a different format.

I don't see anything else interesting there.

Phased updates explains why some packages were held back, but does not explain why the two essential packages were removed.

Maybe that was caused by a getting an early phased update that had problems, but I'd like to see some evidence that this was the case so I can identify a similar situation if it occurs again in the future.

Joe
  • 1,884
  • 2
    If you installed and then removed cmake with snap, shouldn't affect deb/apt packages. What do you mean with wants to uninstall? apt autoremove shouldn't break anything. What show apt install -f? – Pablo Bianchi Aug 04 '23 at 16:48
  • I'm no apt expert, but it looks like removing the metapackages triggers a ton of automatic dependencies to be subsequently removed, I don't see that really long list in my terminal right now, but I did see it there or in muon. – Joe Aug 04 '23 at 17:17
  • 1
    It seems that you did more than install/remove cmake with snap. You could sudo apt-get --with-new-pkgs upgrade (check also) – Pablo Bianchi Aug 04 '23 at 18:08
  • 1
    Its likely the consequence of you previously installing some 3rd party package that conflicts with those Ubuntu meta-packages, this particularly happens with "newer" 3rd party that were taken from later releases (22.10) but re-packaged for the older LTS without proper QA & checks for breakage. I'd explore your apt logs to see what install caused what you're now seeing.. though if you're not using 3rd party; this won't be the first time I've seen this as 22.04.3 packages roll out (which I gather you're doing; alas I don't know cause yet!; re-installing desktop package fixes those). – guiverc Aug 05 '23 at 01:19
  • This seems to have been a repository problem of some sort. It fixed itself now although it made me upgrade several packages one at a time when it said they were held back if I tried to do them all together. – Joe Aug 06 '23 at 10:58
  • @PabloBianchi I was unfamiliar with --with-new-pkgs. I'll add that to my toolkit! – Joe Aug 06 '23 at 11:35
  • @guiverc I posted what I see in the apt logs, but they don't seem to tell me anything about why it happened. Did I miss something? (I'm going to read the link you provided in a moment) – Joe Aug 06 '23 at 11:40
  • @guiverc That article didn't answer this question, but I'm glad you mentioned it because I was seeing some packages being held and thought it was something I needed to fix. From now on, I'll leave them lie unless I have a very specific reason to want them right now. Thanks. – Joe Aug 06 '23 at 11:53
  • Although that other question does answer this issue, there is no way I would have found it not having heard of phased updates. It would be great if Ubuntu/Debian could modify the held back message to indicate that this might be because it is waiting for a phased update. With those key words, I would have been able to find that answer, – Joe Aug 12 '23 at 08:30
  • 1
    The issue you maybe encountering is https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2025462 where you'll note the fix has been committed, and currently sits in jammy-proposed (ie. hasn't yet rolled out to end-users; see comment #16) Note: this is opinion only as I'd need to look at more detail than you provided in your question; but what was given in the answer will work; refer to answer by @Archisman Panigrahi – guiverc Aug 12 '23 at 11:53
  • @guiverc Thanks for the follow up! I'm not great at reading those bug trackers, but comment #21 makes it look like it may have been released. – Joe Aug 18 '23 at 01:29
  • yeah, you can always check using CLI (apt policy apt, rmadison apt etc)... I noted it here as emails get sent to anyone impacted by the bug automatically by launchpad... I'm actually using jammy right now & apt-cache policy show Installed: 2.4.10 (I used rmadison for pasting on the mate discourse as I wasn't on jammy I bet, but it allows me look beyond my current enabled sources thus frequently use it on sites like this) – guiverc Aug 18 '23 at 02:27

1 Answers1

0

Install sudo apt install kubuntu-desktop so that these packages will not be treated as unnecessary dependencies.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • While that might work, it masks the original problem, If I'm using Kubuntu, there's a pretty good chance kubuntu-desktop should be there without my having to do something extra. It didn't say anything about autoremoving/unnecessary packages or give any other reason for removing them that I could see. – Joe Aug 06 '23 at 12:43