Score:0

uninstalled cmake snap, now KDE and xorg want to uninstall

cn flag
Joe

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.

vn flag
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`?
cn flag
Joe
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.
vn flag
It seems that you did more than install/remove cmake with snap. [You could](https://askubuntu.com/a/862799/349837) `sudo apt-get --with-new-pkgs upgrade` ([check also](https://askubuntu.com/a/1398989/349837))
guiverc avatar
cn flag
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*).
cn flag
Joe
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.
cn flag
Joe
@PabloBianchi I was unfamiliar with --with-new-pkgs. I'll add that to my toolkit!
cn flag
Joe
@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)
cn flag
Joe
@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.
cn flag
Joe
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,
guiverc avatar
cn flag
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
cn flag
Joe
@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.
guiverc avatar
cn flag
yeah, you can always check using CLI (`apt policy apt`, `rmadison apt` etc)... I noted it [here](https://ubuntu-mate.community/t/critical-issue-after-full-upgrade/26786/35) 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)
Score:0
us flag

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

cn flag
Joe
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.