# Rocky 9.6 update issues, dnf error: Problem: The operation would result in removing the following protected packages: grub2-efi-x64, grub2-pc

**URL:** <https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696>\
**Category:** Rocky Linux Help & Support\
**Created:** [June 7, 2025, 2:42pm UTC](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696 "2025-06-07T14:42:21Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![mh\_le](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mh\_le](https://forums.rockylinux.org/u/mh_le)\
**Post date:** [June 8, 2025, 2:03pm UTC](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696/21 "2025-06-08T14:03:32Z")

</div>

This is rather mysterious…

```auto
$ sudo dnf update grub2-pc
Last metadata expiration check: 0:01:06 ago on Sun 08 Jun 2025 03:59:38 PM CEST.
Dependencies resolved.
Nothing to do.
Complete!
$ sudo dnf update grub2-efi-x64
Last metadata expiration check: 0:01:23 ago on Sun 08 Jun 2025 03:59:38 PM CEST.
Dependencies resolved.
Nothing to do.
Complete!

```

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [June 8, 2025, 2:20pm UTC](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696/22 "2025-06-08T14:20:24Z")

</div>

Perhaps try a:

```auto
dnf clean all

```

and also check your files under /etc/yum.repos.d/ and make sure you are using the mirrorlist urls for baseos and appstream.

Another easier way would be to do:

```auto
dnf reinstall rocky-repos

```

and then if there are any .rpmnew files in /etc/yum.repos.d then replace the existing .repo files with the .repo.rpmnew ones.

---

<div class="post-metadata">

**Author:** ![mh\_le](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mh\_le](https://forums.rockylinux.org/u/mh_le)\
**Post date:** [June 8, 2025, 2:35pm UTC](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696/23 "2025-06-08T14:35:00Z")

</div>

When reinstalling rocky-repos it was replaced with the 9.6 version, but there was no change when running dnf update.

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [June 8, 2025, 2:37pm UTC](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696/24 "2025-06-08T14:37:53Z")

</div>

If you are not seeing grub2-pc or grub2-efi-x86 packages at 9.6 versions, then you have mirror issues.

```auto
root@rocky9:~# dnf list grub2*
Last metadata expiration check: 1:20:41 ago on Sun 08 Jun 2025 03:16:58 PM CEST.
Installed Packages
grub2-common.noarch 1:2.06-104.el9_6 @baseos
grub2-efi-x64.x86_64 1:2.06-104.el9_6 @baseos
grub2-tools.x86_64 1:2.06-104.el9_6 @baseos
grub2-tools-efi.x86_64 1:2.06-104.el9_6 @baseos
grub2-tools-extra.x86_64 1:2.06-104.el9_6 @baseos
grub2-tools-minimal.x86_64 1:2.06-104.el9_6 @baseos
Available Packages
grub2-efi-aa64-modules.noarch 1:2.06-104.el9_6 baseos 
grub2-efi-x64-cdboot.x86_64 1:2.06-104.el9_6 baseos 
grub2-efi-x64-modules.noarch 1:2.06-104.el9_6 baseos 
grub2-pc.x86_64 1:2.06-104.el9_6 baseos 
grub2-pc-modules.noarch 1:2.06-104.el9_6 baseos 

```

also check the contents of `/etc/dnf/dnf.conf` for any excludes.

---

<div class="post-metadata">

**Author:** ![mh\_le](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mh\_le](https://forums.rockylinux.org/u/mh_le)\
**Post date:** [June 8, 2025, 2:43pm UTC](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696/25 "2025-06-08T14:43:04Z")

</div>

So this seems to have solved it:

```auto
# dnf reinstall grub2-pc grub2-efi-x64
Last metadata expiration check: 0:01:08 ago on Sun 08 Jun 2025 04:38:40 PM CEST.
Dependencies resolved.
========================================================================================================================
 Package Architecture Version Repository Size
========================================================================================================================
Reinstalling:
 grub2-efi-x64 x86_64 1:2.06-104.el9_6 baseos 1.3 M
     replacing grub2-efi-x64.x86_64 1:2.06-94.el9_5
 grub2-pc x86_64 1:2.06-104.el9_6 baseos 14 k
     replacing grub2-pc.x86_64 1:2.06-94.el9_5

Transaction Summary
========================================================================================================================

Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): grub2-pc-2.06-104.el9_6.x86_64.rpm 245 kB/s | 14 kB 00:00
(2/2): grub2-efi-x64-2.06-104.el9_6.x86_64.rpm 9.3 MB/s | 1.3 MB 00:00
------------------------------------------------------------------------------------------------------------------------
Total 3.8 MB/s | 1.3 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing : 1/1
  Reinstalling : grub2-efi-x64-1:2.06-104.el9_6.x86_64 1/6
  Reinstalling : grub2-pc-1:2.06-104.el9_6.x86_64 2/6
  Obsoleting : grub2-efi-x64-1:2.06-94.el9_5.x86_64 3/6
  Cleanup : grub2-efi-x64-1:2.06-104.el9_6.x86_64 4/6
  Obsoleting : grub2-pc-1:2.06-94.el9_5.x86_64 5/6
  Cleanup : grub2-pc-1:2.06-104.el9_6.x86_64 6/6
  Verifying : grub2-pc-1:2.06-104.el9_6.x86_64 1/6
  Verifying : grub2-pc-1:2.06-104.el9_6.x86_64 2/6
  Verifying : grub2-pc-1:2.06-94.el9_5.x86_64 3/6
  Verifying : grub2-efi-x64-1:2.06-104.el9_6.x86_64 4/6
  Verifying : grub2-efi-x64-1:2.06-104.el9_6.x86_64 5/6
  Verifying : grub2-efi-x64-1:2.06-94.el9_5.x86_64 6/6

Reinstalled:
  grub2-efi-x64-1:2.06-104.el9_6.x86_64 grub2-pc-1:2.06-104.el9_6.x86_64

Complete!
# dnf update
Last metadata expiration check: 0:01:28 ago on Sun 08 Jun 2025 04:38:40 PM CEST.
Dependencies resolved.
========================================================================================================================
 Package Architecture Version Repository Size
========================================================================================================================
Upgrading:
 grub2-tools-efi x86_64 1:2.06-104.el9_6 baseos 547 k
     replacing grub2-tools.x86_64 1:2.06-94.el9_5
 grub2-tools-extra x86_64 1:2.06-104.el9_6 baseos 850 k
     replacing grub2-tools.x86_64 1:2.06-94.el9_5

Transaction Summary
========================================================================================================================
Upgrade 2 Packages

Total download size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): grub2-tools-efi-2.06-104.el9_6.x86_64.rpm 4.5 MB/s | 547 kB 00:00
(2/2): grub2-tools-extra-2.06-104.el9_6.x86_64.rpm 6.8 MB/s | 850 kB 00:00
------------------------------------------------------------------------------------------------------------------------
Total 4.1 MB/s | 1.4 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing : 1/1
  Upgrading : grub2-tools-extra-1:2.06-104.el9_6.x86_64 1/5
  Upgrading : grub2-tools-efi-1:2.06-104.el9_6.x86_64 2/5
  Cleanup : grub2-tools-extra-1:2.06-94.el9_5.x86_64 3/5
  Obsoleting : grub2-tools-1:2.06-94.el9_5.x86_64 4/5
  Cleanup : grub2-tools-efi-1:2.06-94.el9_5.x86_64 5/5
  Running scriptlet: grub2-tools-efi-1:2.06-94.el9_5.x86_64 5/5
  Verifying : grub2-tools-efi-1:2.06-104.el9_6.x86_64 1/5
  Verifying : grub2-tools-efi-1:2.06-94.el9_5.x86_64 2/5
  Verifying : grub2-tools-1:2.06-94.el9_5.x86_64 3/5
  Verifying : grub2-tools-extra-1:2.06-104.el9_6.x86_64 4/5
  Verifying : grub2-tools-extra-1:2.06-94.el9_5.x86_64 5/5

Upgraded:
  grub2-tools-efi-1:2.06-104.el9_6.x86_64 grub2-tools-extra-1:2.06-104.el9_6.x86_64

Complete!
# dnf update
Last metadata expiration check: 0:01:41 ago on Sun 08 Jun 2025 04:38:40 PM CEST.
Dependencies resolved.
Nothing to do.
Complete!

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [August 7, 2025, 2:43pm UTC](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696/26 "2025-08-07T14:43:24Z")

</div>

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

[Previous page](https://forums.rockylinux.org/t/rocky-9-6-update-issues-dnf-error-problem-the-operation-would-result-in-removing-the-following-protected-packages-grub2-efi-x64-grub2-pc/18696.md?page=1)
