Bug 2451626

Summary: Upgrade shim does not remove old version direcory /usr/lib/efi/shim/<older version>
Product: [Fedora] Fedora Reporter: HuijingHei <hhei>
Component: shimAssignee: Peter Jones <pjones>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 44CC: javierm, lsandova, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description HuijingHei 2026-03-26 08:06:58 UTC
After upgrade shim, find old version directory /usr/lib/efi/shim/<older version> is not removed.

Reproducible: Always

Steps to Reproduce:
1. # dnf upgrade -y https://kojipkgs.fedoraproject.org//packages/shim/16.1/6/aarch64/shim-aa64-16.1-6.aarch64.rpm
2. # ls -al /usr/lib/efi/shim/*/*/*
/usr/lib/efi/shim/16.1-5/EFI/BOOT:
total 0
drwxr-xr-x. 2 root root  6 Mar 26 03:45 .
drwxr-xr-x. 4 root root 32 Mar 26 03:44 ..

/usr/lib/efi/shim/16.1-5/EFI/fedora:
total 0
drwxr-xr-x. 2 root root  6 Mar 26 03:45 .
drwxr-xr-x. 4 root root 32 Mar 26 03:44 ..

/usr/lib/efi/shim/16.1-6/EFI/BOOT:
total 1144
drwxr-xr-x. 2 root root      44 Mar 26 03:45 .
drwxr-xr-x. 4 root root      32 Mar 18 06:21 ..
-rwx------. 3 root root 1045768 Feb  5 19:00 BOOTAA64.EFI
-rwx------. 1 root root  120576 Feb  5 19:00 fbaa64.efi

/usr/lib/efi/shim/16.1-6/EFI/fedora:
total 2944
drwxr-xr-x. 2 root root      80 Mar 26 03:45 .
drwxr-xr-x. 4 root root      32 Mar 18 06:21 ..
-rw-------. 1 root root     112 Feb  5 19:00 BOOTAA64.CSV
-rwx------. 1 root root  912128 Feb  5 19:00 mmaa64.efi
-rwx------. 3 root root 1045768 Feb  5 19:00 shimaa64.efi
-rwx------. 3 root root 1045768 Feb  5 19:00 shim.efi
Actual Results:
After upgrade, the old /usr/lib/efi/shim/16.1-5 is not removed

Expected Results:
After upgrade, the old /usr/lib/efi/shim/16.1-5 should be removed