Description of problem: I performed a fresh install of Fedora 24 about two weeks ago. During that time, I decided to try the KDE Desktop, as an alternative to the default GNOME, so I ran "dnf groups install 'KDE Plasma Workspaces'" which worked as expected and installed the requested desktop environment and some other applications. Removing KDE, however, has proven to be a much more difficult task. When I run "dnf group remove 'KDE Plasma Workspaces'" I get the following message: "Error: The operation would result in removing the following protected packages: systemd, dnf." I cannot understand why, when I am trying to remove a desktop environment, dnf tries to gut my system and remove the package manager and init system. Surely this is not intended behaviour?
(In reply to mozarella.firefox from comment #0) > Description of problem: I performed a fresh install of Fedora 24 about two > weeks ago. During that time, I decided to try the KDE Desktop, as an > alternative to the default GNOME, so I ran "dnf groups install 'KDE Plasma > Workspaces'" which worked as expected and installed the requested desktop > environment and some other applications. Removing KDE, however, has proven > to be a much more difficult task. When I run "dnf group remove 'KDE Plasma > Workspaces'" I get the following message: "Error: The operation would result > in removing the following protected packages: systemd, dnf." > > I cannot understand why, when I am trying to remove a desktop environment, > dnf tries to gut my system and remove the package manager and init system. > Surely this is not intended behaviour? Hello, I believe I saw you on IRC last night asking about this issue. I used a Fedora 24 VM to test this and got your same result. However, I was able to get a clean removal using a method from Fedora's Documenatation. https://docs.fedoraproject.org/en-US/Fedora/16/html/System_Administrators_Guide/sec-Removing.html ~]# dnf remove @kde-desktop Double-check the packages to be removed, because I tested from a basic install and I don't know what else you have installed. But I agree, you would think KDE could be removed safely using the 'dnf group remove.'
Thank you, the command ~]# dnf remove @kde-desktop worked. However, I'm frustrated that this isn't in the man pages, at least not that I could find, and that 'dnf group remove' does *not* do what the user expects at all!
Can you please attach debugdata [1]? [1] https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting#dependency-resolution-problem
(In reply to Jan Silhan from comment #3) > Can you please attach debugdata [1]? you can easily reproduce it. if you have workstation, just try to remove "fedora workstation" group and you will get same results.
Seconding comment four, what Igor Gnatenko said.
(In reply to notadrop from comment #2) > Thank you, the command > > ~]# dnf remove @kde-desktop > > worked. > > However, I'm frustrated that this isn't in the man pages, at least not that > I could find, and that 'dnf group remove' does *not* do what the user > expects at all! Ok, had the same problem with the Cinnamon Spin, and try KDE... The fix work, but why do I still have this when I run "dnf grouplist" : Installed environment groups: KDE Plasma Workspaces and when I run again "dnf grouperemove "KDE Plasma Workspaces"" I still get: Last metadata expiration check: 0:29:24 ago on Fri Aug 19 23:19:02 2016. Dependencies resolved. Error: The operation would result in removing the following protected packages: systemd, dnf. Note: I have install konsole, so it might be the reason.
I investigate the issue and find very interesting points. Just from beginning, the environmental groups are composed from groups. See list of mandatory groups. Mandatory Groups: Administration Tools Common NetworkManager Submodules Core Dial-up Networking Support Fonts Guest Desktop Agents Hardware Support Input Methods KDE Multimedia Printing Support Standard base-x If you compare env_groups, you will see that all of them has one common group `core`. If you install additional env-group, it install or mark required groups as installed. So far it is fine. The primary problem is that during system deploy installator (anaconda) didn't mark installed groups, but marked only packages that where installed with reason group (the problem is already fixed). To prevent the problem you have to, before you want to uninstall env-group, fix the problem by marking group "Fedora Workstation" as installed (``dnf group install "Fedora Workstation"`` or ``dnf group mark install "Fedora Workstation"``). Then your system will not try to remove group "core" because it is required by other env_group. From my side I think I can close the bug, because it will be solved in next fedora where groups will be marked correctly. Please if my description doesn't help, or you will discover other issue, please don't hesitate to reopen it or file new beg report. Feed backs from users are really important to us.
I'm affected by this bug as well.
Please David if you are not satisfied with solution in Comment 7, provide additional information. Anyway we cannot refactor dnf-1.1 into dnf-2.5+, therefore issues with group implementation from up to fedora 25 cannot be solved.
I have tried installing 'Fedora Workstation' before doing dnf group remove 'KDE Plasma Workspaces' but I get this error: $ sudo dnf group remove 'KDE Plasma Workspaces' Dependencies resolved. Traceback (most recent call last): File "/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main return cli_run(cli, base) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run ret = resolving(cli, base) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving base.do_transaction(display=displays) File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 170, in do_transaction grp_str = self.output.list_group_transaction(self.comps, self._group_persistor, grp_diff) File "/usr/lib/python3.6/site-packages/dnf/cli/output.py", line 948, in list_group_transaction grp_name = comps._group_by_id(grp_id).ui_name AttributeError: 'NoneType' object has no attribute 'ui_name'
Please could you provide a version of dnf, output of "dnf group list" and "dnf repolist"? Thanks
I provide a patch, but this is a blind fix (https://github.com/rpm-software-management/dnf/pull/881).
I experienced the same problem when uninstall plasma: sudo dnf groupremove "KDE Plasma Workspaces" Dependencies resolved. Traceback (most recent call last): File "/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main return cli_run(cli, base) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run ret = resolving(cli, base) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving base.do_transaction(display=displays) File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 170, in do_transaction grp_str = self.output.list_group_transaction(self.comps, self._group_persistor, grp_diff) File "/usr/lib/python3.6/site-packages/dnf/cli/output.py", line 954, in list_group_transaction grp_name = comps._group_by_id(grp_id).ui_name AttributeError: 'NoneType' object has no attribute 'ui_name' Running command sudo dnf remove @kde-desktop didn't remove Plasma. As I still see plasma packages. Why there is KDE desktop and Plasma workspace? Are they supposed to be same?
dnf-2.6.3-1.fc26 dnf-plugins-extras-2.0.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
Fedora 33 exhibit the same behavior.i.e. "KDE Plasma Workspaces" cannot be removed using dnf as it tries to remove sudo also.
It seems closed but I get a new mail each day about this bug, why?
Probably because of the needinfo flag. Now that you've removed it, the emails should stop.