Uninstall KDE cleanly

I installed kde by dnf install @kde-desktop hoping to get rid of this issue following this reply.
However, neither the issue was resolved nor do I like kde-desktop.
I tried to remove it by undoing the transaction ID like - sudo dnf history undo
But then it says

No package @kde-desktop installed.
Error: no package matched

How should I cleanly remove kde without affecting the dependencies that gnome relies on too?

I think I should not do dnf remove @kde-desktop because that will also remove a hell lot of other applications like Xorg, etc which the gnome-de depends on too.

If I do dnf remove kde-* qt-* plasma-* then I fear that it won’t be a clean uninstall and will leave me unable to undo the transaction by which I installed the kde-desktop.

I am using fedora32-beta fresh install.

Error message says kde-desktop group is not installed. Can you mark it as installed with sudo dnf group mark install kde-desktop and try sudo dnf history undo again?

And can you post sudo dnf history, at least last couple ones, in case that didn’t solve the issue?

I did as told by @ersen.
Here is the trimmed output of sudo dnf history undo 31 -

Last metadata expiration check: 0:01:27 ago on Sun 05 Apr 2020 11:56:03 PM IST.
Undoing transaction 31, from Sat 04 Apr 2020 11:17:56 PM IST
Install NetworkManager-l2tp-1.8.2-1.fc32.x86_64 @updates-testing
Install appstream-0.12.10-1.fc32.x86_64 @updates-testing

No package breeze-icon-theme-5.67.0-1.fc32.noarch installed.
No package @kde-desktop installed.
No package kf5-attica-5.67.0-1.fc32.x86_64 installed.

No package kf5-threadweaver-5.67.0-1.fc32.x86_64 installed.
No package qqc2-desktop-style-5.67.0-1.fc32.x86_64 installed.
Error: no package matched


Here is the list of dnf history -

35 | group mark install kde-desktop                                                              | 2020-04-05 23:56 | Install        |    1   
34 | install dnf-plugin-system-upgrade                                                           | 2020-04-05 14:08 | Install        |    2   
33 | update --refresh                                                                            | 2020-04-05 13:26 | I, U           |   97   
32 |                                                                                             | 2020-04-05 12:21 | Upgrade        |    3   
31 | install @kde-desktop                                                                        | 2020-04-04 23:17 | Install        |  364 EE
30 | install meson                                                                               | 2020-04-04 22:21 | Install        |    2   
29 | update                                                                                      | 2020-04-04 20:25 | E, I, U        |   73 EE
28 | install obs-studio                                                                          | 2020-04-03 21:52 | Install        |    7   
27 | update                                                                                      | 2020-04-03 21:24 | Upgrade        |    2 EE
26 | update                                                                                      | 2020-04-02 15:40 | Upgrade        |   47 EE
25 | install torbrowser-launcher-0.3.2-12.fc32.noarch                                            | 2020-04-02 00:52 | Install        |   19   
24 | install vlc                                                                                 | 2020-04-02 00:25 | Install        |   30   
23 | groupupdate Multimedia                                                                      | 2020-04-02 00:21 | Install        |   28   
22 | install cargo                                                                               | 2020-04-01 23:52 | Install        |    3   
21 |                                                                                             | 2020-04-01 23:42 | Install        |    2   
20 |                                                                                             | 2020-04-01 23:40 | Install        |    3   
19 | update                                                                                      | 2020-04-01 21:57 | Upgrade        |   73   
18 | remove epiphany-1:3.36.0-1.fc32.x86_64                                                      | 2020-03-31 17:17 | Removed        |    2

What is the transaction 32? And if you update a package installed at 31 later in the 33, maybe breeze-icon-theme or others in the error message, history undo fails because it tries to rollback the package with the previous version.

1 Like

Try: sudo dnf groupremove "KDE"?

Installing whole desktop environments generally also tries to remove lots of other packages, so do check the transaction first.

I don’t know what transaction 32, 21 or 20 are. I don’t remember. So should I undo the update (35,34,33) and then undo 31?

sudo dnf groupremove "KDE"
Warning: Module or Group ‘KDE’ is not installed.
Dependencies resolved.
Nothing to do.
Complete!

I have uploaded the output of sudo dnf remove @kde-desktop .

https://paste.centos.org/view/8fa5e85c

I haven’t proceeded with the transaction yet.

The section which says removing unused dependencies, are all the packages in it safe to remove?

This fails because name of the group is KDE (K Desktop Environment).

I have GNOME installed and none of those packages are installed. I also tried to install KDE group and it listed those packages as to be installed.

1 Like

so can i do the dnf remove @kde-desktop ?

I don’t have any on these packages and my system is working fine, so I would say yes, but please backup any important data.

1 Like

I did dnf remove @kde-desktop. It worked like a charm. Cleanly removes the apps and stuffs belonging to KDE while keeping Gnome running uninterrupted. A later reboot also shows no problem in Gnome (Wayland). However, I had to manually remove all the config files KDE apps created in ~/.config , ~ and ~/.local dirs.

5 Likes

I am glad it worked. dnf never removes files in ~/.config and ~/.local in case you want to install those programs later, you need to manually do that.

3 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.