OS: Ubuntu 20.04.4 LTS
I'm running this command:
sudo apt upgrade
Then it throws this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
linux-image-unsigned-5.18.0-051800-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 11,3 MB disk space will be freed.
Do you want to continue? [Y/n]
dpkg: warning: files list file for package 'linux-modules-5.13.0-48-generic' mis
sing; assuming package has no files currently installed
(Reading database ... 428444 files and directories currently installed.)
Removing linux-image-unsigned-5.18.0-051800-generic (5.18.0-051800.202205222030)
...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.18.0-051800-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/tela/theme.txt
/etc/grub.d/41_linux_proxy: 3: /etc/grub.d/bin/grubcfg_proxy: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-unsigned-5.18.0-051800-generic (--rem
ove):
installed linux-image-unsigned-5.18.0-051800-generic package post-removal scrip
t subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-unsigned-5.18.0-051800-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
When I try sudo apt --fix-broken install and the output is:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-unsigned-5.18.0-051800-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 11,3 MB disk space will be freed.
Do you want to continue? [Y/n]
dpkg: warning: files list file for package 'linux-modules-5.13.0-48-generic' mis
sing; assuming package has no files currently installed
(Reading database ... 428444 files and directories currently installed.)
Removing linux-image-unsigned-5.18.0-051800-generic (5.18.0-051800.202205222030)
...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.18.0-051800-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/tela/theme.txt
/etc/grub.d/41_linux_proxy: 3: /etc/grub.d/bin/grubcfg_proxy: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-unsigned-5.18.0-051800-generic (--rem
ove):
installed linux-image-unsigned-5.18.0-051800-generic package post-removal scrip
t subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-unsigned-5.18.0-051800-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I tried these:
sudo apt remove linux-image-unsigned-5.18.0-051800-generic
sudo apt autoremove
These commands throw the same error. Then I thought maybe I can reinstall this package and
sudo apt-get install linux-modules-5.18.0-051800-generic
It throws this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-modules-5.18.0-051800-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'linux-modules-5.18.0-051800-generic' has no installation candidate
Also,
sudo apt update's output is:
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://packages.microsoft.com/repos/code stable InRelease
Hit:4 http://tr.archive.ubuntu.com/ubuntu focal InRelease
Hit:5 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu focal InRelease
Hit:6 https://updates.signal.org/desktop/apt xenial InRelease
Hit:7 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease
Get:8 http://tr.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:9 http://ppa.launchpad.net/audio-recorder/ppa/ubuntu focal InRelease
Hit:10 http://repo.mysql.com/apt/ubuntu bionic InRelease
Hit:11 http://ppa.launchpad.net/costales/yaru-colors-folder-color/ubuntu focal InRelease
Hit:12 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Ign:13 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 InRelease
Hit:14 http://ppa.launchpad.net/flatpak/stable/ubuntu focal InRelease
Hit:15 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 Release
Get:16 http://tr.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Hit:17 http://ppa.launchpad.net/gerardpuig/ppa/ubuntu focal InRelease
Hit:18 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu focal InRelease
Hit:20 http://ppa.launchpad.net/numix/ppa/ubuntu focal InRelease
Hit:21 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:22 http://ppa.launchpad.net/papirus/papirus/ubuntu focal InRelease
Hit:23 http://ppa.launchpad.net/teejee2008/ppa/ubuntu focal InRelease
Fetched 336 kB in 2s (149 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Note: I've installed this kernel by downloading from https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D My original kernel is (uname -r): 5.13.0-35-generic
I've installed this, because old one was blocking the upgrade as well.
I tried to apt-mark hold for these packages, but that also didn't work.
I couldn't understand why I can't upgrade my system. If I can remove this new kernel, how can I do that?