Score:0

Problems uninstalling KDE Plasma

in flag
Sid

I was running Ubuntu server and wanted to use a DE, but now I can't uninstall it. There are some problems with sleep settings, where the server will go to sleep because of some packages installed by KDE Plasma. When I try to remove it I get "not installed so not removed"

Here is exactly what I do.

sudo apt purge plasma-desktop:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'plasma-desktop' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.

But then I run sudo apt list plasma:

Listing... Done

plasma-applet-redshift-control/focal 1.0.18+phabricator~2019080100-1 all

plasma-browser-integration/focal-updates,now 5.18.5-0ubuntu0.1 amd64 [residual-config]

plasma-calendar-addons/focal-updates 4:5.18.7-0ubuntu0.1 amd64

plasma-dataengines-addons/focal-updates 4:5.18.7-0ubuntu0.1 amd64

plasma-desktop-data/focal-updates 4:5.18.8-0ubuntu0.1 all

... And even more packages.

Clearly SOMETHING is still installed. How can I get rid of it?

guiverc avatar
cn flag
Installing desktop packages on a server setup can change many configs to desktop defaults (inc. power), removal of those packages will remove the packages; but settings changed on install need to be reversed manually; some changes being done by post-install scripts not the packages themselves (*a consequence of installing the packages yes*). Your issue maybe isn't package related; but configs changed. You should provide release details & be specific as to what packages were installed, how removed etc. Did you use `purge` though even that won't *likely* fix all. Did you `sudo apt autoremove`
Nmath avatar
ng flag
Does the problem resolve when you remove those other packages?
Sid avatar
in flag
Sid
@guiverc I have used both the sudo apt purge and the sudo apt autoremove commands. I didn't know that the settings could be permanently changed, but it seems like the packages are still installed, due to the apt list | grep plasma command that I ran.
Sid avatar
in flag
Sid
@Nmath My problem is that I cannot uninstall the packages. For instance if you look at the second command that I ran, and i pick any package from the listed packages it will not uninstall. For instance, the plasma-desktop package. If I use sudo apt purge plasma-desktop the result is: Reading state information... Done Package 'plasma-desktop' is not installed, so not removed. If I run apt list | grep plasma-desktop the result will be show that it is still installed.
guiverc avatar
cn flag
You've not provided details of what you actually installed; mentioning a specific package you removed (or *attempted to remove*) but no clues have been provided as to what was actually installed. You have access to the machine, thus can view it's logs, we cannot. If we're to properly help you need to provide what was installed (ideally commands); and what was removed/purged; your pasted error implies you didn't install that package (or had already removed it - ie. operator error)
Nmath avatar
ng flag
But the meta package `plasma-desktop` is not in that list. `plasma-desktop-data` is a different package. In any case, you may have learned the hard way why adding a DE just to try it is a bad idea. In the future you can use a live session so it won't affect your installed system. DE meta packages pull in dozens, sometimes 100+ dependencies. It's really messy to remove or change a DE, that's why Ubuntu comes in so many official flavours
guiverc avatar
cn flag
Maybe useful (recent question - https://askubuntu.com/questions/1393497/safe-way-to-remove-des) but as already outlined you've not provided clear details of what was done to install the desktop, so I at least have no clues to guide you (& I'm somewhat familiar with adding/removing desktops!)
user535733 avatar
cn flag
@Sid your second output (apt list) does NOT seem to include any installed packages. Installed packages are denoted by the marking `[installed]`. You are showing a single package (plasma-browser-integration) that is marked `[residual-config]` use apt's 'purge' command to get rid of residual configs.
Sid avatar
in flag
Sid
@Nmath I have definitely learned my lesson. I cut the list of packages due to length, but plasma-desktop was included among them.
Sid avatar
in flag
Sid
@guiverc In case I wasn't clear enough, I use 'apt list | grep plasma' and see many installed packages, but when I try to remove them I get the "not installed so not removed. However, user535733 says that installed packages are marked by [installed], which means that I am somehow seeing not installed packages. If they really aren't installed and my power problems are due to bad config files, how should I change these things back, and what are the listed packages?
guiverc avatar
cn flag
But I'm asking how they were installed; as the best method of removing them is the reverse of how installed (*if you're trying to avoid issues on your base system; otherwise you're best looking at the package logs & reversing that way; but the fewer packages changes the better into the future with release-upgrade etc in mind*). You've not provided that detail which is what I'd use to ensure best results & least impact on the system you had before you added KDE/Kubuntu packages (*and as already stated; into the future should you wish to release-upgrade to 22.04 easily etc*)...
Sid avatar
in flag
Sid
@guiverc I honestly don't care about any issues on my system as it's a side project that only has a few extra packages. I just want to avoid the fuss of resetting the system. Is there any straightforward way of doing this? Sorry if I'm being a bit silly, I'm still a novice at this kind of thing.
guiverc avatar
cn flag
As already stated the easiest is to reverse what was done; `apt` logs are a huge clue (`var/log/apt/history.log`) where it's apt/dpkg commands that made changes, otherwise it'll be elsewhere. If you manually installed https://packages.ubuntu.com/focal/plasma-applet-redshift-control https://packages.ubuntu.com/focal/plasma-desktop-data & the other packages in your list; you can remove them - but I'm *betting* unless you specifically manually installed them; you're just going after *easy* fruit and not the real problem (and the more changes made the more non-standard you're making your system..
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.