Score:0

System removed all packages after trying to install a new one on updated Kubuntu

sm flag

Today I updated stable system Kubuntu 20.04 to Kubuntu 22.04. It was successfully and looked fine. But I noticied that I don't have Steam and tried to install by command:

sudo apt install steam

This command caused the removal of a large list of other installed packages (more than a thousand, I think). After rebooting the system, I was no longer able to enter the GUI interface. Now only TTY is available to me. The commands sudo apt update & sudo apt upgrade do not install anything new, on the contrary, they tell me that I need to remove a lot of packages with the sudo apt autoremove command. Help, is it possible to somehow restore the previous version without a backup?

Score:0
in flag

In general, if an apt command is going to cause removal of a large number of packages, you probably should reject the action. At the very least, you should make sure what is going to be removed isn't something you care about, like your graphical environment.

Likely the package you tried to install conflicted with something important. Possibly it is for the wrong version of the operating system.

You can probably restore your desktop with apt install ubuntu-desktop, or kubuntu-desktop for kubuntu or one of the several other desktop flavors. If this was removed, reinstalling it will likely force the package you installed to be removed instead. It might even help to remove it ahead of time.

You can look at /var/log/apt/history.log and find the command you ran that removed everything and pick through the packages listed after that and reinstall them one by one or all at once, and use dpkg -l on them afterwards to see if any were missed. Likely there are a few key packages (like ubuntu-desktop) that will pull in a large portion of the rest.

With some clever shell commands, it is possible to automate some of this.

user10489 avatar
in flag
Ahh, missed the kubuntu reference. Good point.
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.