50-dracut.install fails during uninstall with >rm: cannot remove '/boot/efi/04415f4205a64c0691dcaf68b2389ae1/6.7.9-200.fc39.aarch64/': Is a directory >Apr 29 02:08:21 localhost dnf-3[775]: /usr/lib/kernel/install.d/50-dracut.install failed with exit status 1. The cause seems to be the following lines in /usr/lib/kernel/install.d/50-dracut.install >if [[ -d "$BOOT_DIR_ABS" ]]; then > INITRD="initrd" >else > # No layout information, use users --uefi/--no-uefi preference > UEFI_OPTS="" > if [[ -d $BOOT_DIR_ABS ]]; then > IMAGE="initrd" > else > BOOT_DIR_ABS="/boot" > IMAGE="initramfs-${KERNEL_VERSION}.img" > fi >fi Which makes no sense to me, cause $INITRD is nowhere referenced in the script again. While $IMAGE isn't being set if $BOOT_DIR_ABS is a directory (which it is), so later in: >rm -f -- "$BOOT_DIR_ABS/$IMAGE" It tries to remove the $BOOT_DIR_ABS and fails, cause that's a directory. It seems to be caused by this patch: https://src.fedoraproject.org/rpms/dracut/blob/rawhide/f/0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch Reproducible: Always Steps to Reproduce: 1.Uninstall any kernel Running with systemd-boot.
As reference, someone else noticing the same problem: https://discussion.fedoraproject.org/t/kernel-uninstall-failed-during-f39-to-f40-upgrade/114788/1
*** This bug has been marked as a duplicate of bug 2274356 ***