I am having a similar problem here. I am trying to uninstall the AMD ROCM kernel module, which fails with the following message:
sudo apt autoremove amdgpu-dkms Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be REMOVED: amdgpu-dkms 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 441 MB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 214096 files and directories currently installed.) Removing amdgpu-dkms (1:6.1.5.50601-1649308.22.04) ... update-initramfs: Generating /boot/initrd.img-6.2.0-31-generic grep: /boot/config-6.2.0-31-generic: No such file or directory W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip grep: /boot/config-6.2.0-31-generic: No such file or directory E: gzip compression (CONFIG_RD_GZIP) not supported by kernel update-initramfs: failed for /boot/initrd.img-6.2.0-31-generic with 1. dpkg: error processing package amdgpu-dkms (--remove): installed amdgpu-dkms package post-removal script subprocess returned error exit status 1 dpkg: too many errors, stopping Errors were encountered while processing: amdgpu-dkms Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) Again update-initramfs seems to try to do something with an non-existent kernel: laurenz@katuunko:~$ dpkg -l | grep linux- ii binutils-x86-64-linux-gnu 2.40-2ubuntu4.1 amd64 GNU binary utilities, for x86-64-linux-gnu target ii linux-base 4.5ubuntu9 all Linux image base package ii linux-firmware 20230323.gitbcdcfbcf-0ubuntu1.6 all Firmware for Linux kernel drivers ii linux-generic 6.2.0.33.33 amd64 Complete Generic Linux kernel and headers ii linux-generic-hwe-22.04 6.2.0.33.33 amd64 Complete Generic Linux kernel and headers ii linux-headers-6.2.0-32 6.2.0-32.32 all Header files related to Linux kernel version 6.2.0 ii linux-headers-6.2.0-32-generic 6.2.0-32.32 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP ii linux-headers-6.2.0-33 6.2.0-33.33 all Header files related to Linux kernel version 6.2.0 ii linux-headers-6.2.0-33-generic 6.2.0-33.33 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP ii linux-headers-generic 6.2.0.33.33 amd64 Generic Linux kernel headers ii linux-headers-generic-hwe-22.04 6.2.0.33.33 amd64 Generic Linux kernel headers ii linux-image-6.2.0-32-generic 6.2.0-32.32 amd64 Signed kernel image generic ii linux-image-6.2.0-33-generic 6.2.0-33.33+1 amd64 Signed kernel image generic ii linux-image-generic 6.2.0.33.33 amd64 Generic Linux kernel image ii linux-image-generic-hwe-22.04 6.2.0.33.33 amd64 Generic Linux kernel image ii linux-libc-dev:amd64 6.2.0-33.33 amd64 Linux Kernel Headers for development ii linux-modules-6.2.0-32-generic 6.2.0-32.32 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP ii linux-modules-6.2.0-33-generic 6.2.0-33.33 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP ii linux-modules-extra-6.2.0-32-generic 6.2.0-32.32 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP ii linux-modules-extra-6.2.0-33-generic 6.2.0-33.33 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP ii linux-sound-base 1.0.25+dfsg-0ubuntu7 all base package for ALSA and OSS sound systems ii util-linux-extra 2.38.1-4ubuntu1 amd64 interactive login tools laurenz@katuunko:~$ linux-version list 6.2.0-32-generic 6.2.0-33-generic Any idea what to do? I already tried running "dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge" -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-firmware in Ubuntu. https://bugs.launchpad.net/bugs/2036339 Title: Unable to install linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6) "SOLVED" Status in linux-firmware package in Ubuntu: Invalid Bug description: O.S.: Ubuntu 23.04 Package: linux-firmware 20230323.gitbcdcfbcf-0ubuntu1.6 Trying to install the package above, I receive these errors: Configuring linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6)... update-initramfs: Generating /boot/initrd.img-6.2.0-32-generic update-initramfs: Generating /boot/initrd.img-6.2.0-31-generic update-initramfs: Generating /boot/initrd.img-6.2.0-24-generic grep: /boot/config-6.2.0-24-generic: No such file or directory W: zstd compression (CONFIG_RD_ZSTD) not supported by the kernel, using gzip grep: /boot/config-6.2.0-24-generic: No such file or directory E: gzip compression (CONFIG_RD_GZIP) not supported by the kernel update-initramfs: failed for /boot/initrd.img-6.2.0-24-generic with exit code 1 dpkg: error processing package linux-firmware (--configure): subprocess installed linux-firmware package post-installation script returned error status 1 Errors were encountered while processing: linux-firmware E: Sub-process /usr/bin/dpkg returned an error code (1) I tried to uninstall the package with sudo apt remove --purge linux-firmware and then reinstall it, but without success. Same result when trying installing older packages 20230323.gitbcdcfbcf-0ubuntu1.2 and 20230323.gitbcdcfbcf-0ubuntu1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2036339/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp