Not able to Update

I recently got a pop-up from the package manager regarding an update and clicked install. Later I got an message for package installation failure and an exclamation mark on my taskbar. So, I ran the following command and many more and they gave me the following error.

sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libsystemd0:i386 libudev1:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-unsigned-5.15.0-43-generic
Suggested packages:
  fdutils linux-doc | linux-hwe-5.15-source-5.15.0 linux-hwe-5.15-tools
  linux-headers-5.15.0-43-generic linux-modules-extra-5.15.0-43-generic
The following packages will be REMOVED:
  linux-image-5.15.0-43-generic
The following NEW packages will be installed:
  linux-image-unsigned-5.15.0-43-generic
0 upgraded, 1 newly installed, 1 to remove and 18 not upgraded.
2 not fully installed or removed.
Need to get 0 B/11.2 MB of archives.
After this operation, 360 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
dpkg: linux-image-5.15.0-43-generic: dependency problems, but removing anyway as
 you requested:
 linux-modules-5.15.0-43-generic depends on linux-image-5.15.0-43-generic | linu
x-image-unsigned-5.15.0-43-generic; however:
  Package linux-image-5.15.0-43-generic is to be removed.
  Package linux-image-unsigned-5.15.0-43-generic is not installed.

(Reading database ... 290921 files and directories currently installed.)
Removing linux-image-5.15.0-43-generic (5.15.0-43.46~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-43-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/zorin/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-48-generic
Found initrd image: /boot/initrd.img-5.15.0-48-generic
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Adding boot menu entry for UEFI Firmware Settings
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-43-generic (--remove):
 installed linux-image-5.15.0-43-generic package post-removal script subprocess 
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.15.0-43-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Also, I ran all the commands in this link none works, Can anyone help me?

Why is it trying to replace 5.15.0-43 with an Unsigned package?

Since you have bootable kernels for 5.15.0-46 and 5.15.0-48, I would recommend removing 5.15.0-43 in all of its forms. You can use Synaptic or the terminal to do so.

Quick F.Y.I, How Do we Do That???
I am very bad with Terminal codes and recently I asked a lot of them from @ghostminator So, Can You Provide me the Codes for the following :smile:

I Don't Know :woman_shrugging: It was Provided by Zorin Right?

Nothing Works :sob:

sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libsystemd0:i386 libudev1:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-unsigned-5.15.0-43-generic
Suggested packages:
  fdutils linux-doc | linux-hwe-5.15-source-5.15.0 linux-hwe-5.15-tools
  linux-headers-5.15.0-43-generic linux-modules-extra-5.15.0-43-generic
The following packages will be REMOVED:
  linux-image-5.15.0-43-generic
The following NEW packages will be installed:
  linux-image-unsigned-5.15.0-43-generic
0 upgraded, 1 newly installed, 1 to remove and 18 not upgraded.
2 not fully installed or removed.
Need to get 0 B/11.2 MB of archives.
After this operation, 360 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
dpkg: linux-image-5.15.0-43-generic: dependency problems, but removing anyway as
 you requested:
 linux-modules-5.15.0-43-generic depends on linux-image-5.15.0-43-generic | linu
x-image-unsigned-5.15.0-43-generic; however:
  Package linux-image-5.15.0-43-generic is to be removed.
  Package linux-image-unsigned-5.15.0-43-generic is not installed.

(Reading database ... 290921 files and directories currently installed.)
Removing linux-image-5.15.0-43-generic (5.15.0-43.46~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-43-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/zorin/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-48-generic
Found initrd image: /boot/initrd.img-5.15.0-48-generic
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Adding boot menu entry for UEFI Firmware Settings
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-43-generic (--remove):
 installed linux-image-5.15.0-43-generic package post-removal script subprocess 
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.15.0-43-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please Provide the Output For,

apt list --installed | grep -i linux-image
linux-image-5.15.0-43-generic/focal-updates,focal-security,focal-updates,now 5.15.0-43.46~20.04.1 amd64 [installed]
linux-image-5.15.0-46-generic/focal-updates,focal-security,focal-updates,now 5.15.0-46.49~20.04.1 amd64 [installed,automatic]
linux-image-5.15.0-48-generic/focal-updates,focal-security,focal-updates,now 5.15.0-48.54~20.04.1 amd64 [installed,automatic]
linux-image-generic-hwe-20.04/focal-updates,focal-security,focal-updates,now 5.15.0.48.54~20.04.18 amd64 [installed,automatic]

Try,
sudo dpkg --configure -a --abort-after=99999

Not Working,

sudo dpkg --configure -a --abort-after=99999
[sudo] password for dualipa:          
Setting up linux-image-5.15.0-48-generic (5.15.0-48.54~20.04.1) ...
Processing triggers for linux-image-5.15.0-48-generic (5.15.0-48.54~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-48-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-48-generic
W: Possible missing firmware /lib/firmware/amdgpu/yellow_carp_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
/etc/kernel/postinst.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/zorin/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-48-generic
Found initrd image: /boot/initrd.img-5.15.0-48-generic
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Adding boot menu entry for UEFI Firmware Settings
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-48-generic (--configure):
 installed linux-image-5.15.0-48-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.15.0-48-generic
sudo apt-get purge linux-image-5.15.0-43-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-modules-5.15.0-43-generic : Depends: linux-image-5.15.0-43-generic but it is not going to be installed or
                                            linux-image-unsigned-5.15.0-43-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libsystemd0:i386 libudev1:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-unsigned-5.15.0-43-generic
Suggested packages:
  fdutils linux-doc | linux-hwe-5.15-source-5.15.0 linux-hwe-5.15-tools
  linux-headers-5.15.0-43-generic linux-modules-extra-5.15.0-43-generic
The following packages will be REMOVED:
  linux-image-5.15.0-43-generic
The following NEW packages will be installed:
  linux-image-unsigned-5.15.0-43-generic
0 upgraded, 1 newly installed, 1 to remove and 18 not upgraded.
2 not fully installed or removed.
Need to get 11.2 MB of archives.
After this operation, 360 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-image-unsigned-5.15.0-43-generic amd64 5.15.0-43.46~20.04.1 [11.2 MB]
Fetched 11.2 MB in 8s (1,389 kB/s)                                             
dpkg: linux-image-5.15.0-43-generic: dependency problems, but removing anyway as you requested:
 linux-modules-5.15.0-43-generic depends on linux-image-5.15.0-43-generic | linux-image-unsigned-5.15.0-43-generic; however:
  Package linux-image-5.15.0-43-generic is to be removed.
  Package linux-image-unsigned-5.15.0-43-generic is not installed.

(Reading database ... 290921 files and directories currently installed.)
Removing linux-image-5.15.0-43-generic (5.15.0-43.46~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-43-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/zorin/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-48-generic
Found initrd image: /boot/initrd.img-5.15.0-48-generic
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Adding boot menu entry for UEFI Firmware Settings
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-43-generic (--remove):
 installed linux-image-5.15.0-43-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.15.0-43-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt remove linux-image-unsigned-5.15.0-43-generic linux-image-5.15.0-43-generic linux-headers-5.15.0-43-generic linux-modules-5.15.0-43-generic linux-modules-extra-5.15.0-43-generic

1 Like

I am the most unluckiest Person Ever :sob:

sudo apt remove linux-image-unsigned-5.15.0-43-generic linux-image-5.15.0-43-generic linux-headers-5.15.0-43-generic linux-modules-5.15.0-43-generic linux-modules-extra-5.15.0-43-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'linux-headers-5.15.0-43-generic' is not installed, so not removed
Package 'linux-image-unsigned-5.15.0-43-generic' is not installed, so not removed
Package 'linux-modules-extra-5.15.0-43-generic' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libsystemd0:i386 libudev1:i386
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-5.15.0-43-generic linux-modules-5.15.0-43-generic
0 upgraded, 0 newly installed, 2 to remove and 18 not upgraded.
2 not fully installed or removed.
After this operation, 123 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 290921 files and directories currently installed.)
Removing linux-modules-5.15.0-43-generic (5.15.0-43.46~20.04.1) ...
Removing linux-image-5.15.0-43-generic (5.15.0-43.46~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.15.0-43-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/zorin/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-48-generic
Found initrd image: /boot/initrd.img-5.15.0-48-generic
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Adding boot menu entry for UEFI Firmware Settings
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-5.15.0-43-generic (--remove):
 installed linux-image-5.15.0-43-generic package post-removal script subprocess 
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.15.0-43-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-image-5.15.0-43-generic : Depends: linux-modules-5.15.0-43-generic but it is not going to be installed
E: Broken packages

I am seeing a lot of oddball things here. You have installed some 32bit packages... they now show as no longer needed. Were you trying to install a 32bit piece of software previous to this?
You appear to have some issues with Grub...
Can you run:

sudo dpkg --configure -a

sudp apt install -f

sudo apt remove linux-image-unsigned-5.15.0-43-generic

Now for Grub

sudo apt update

sudo apt remove --purge grub-pc grub-common

Tab for ok then hit enter.
Now reinstall:

sudo apt install grub-pc grub-common

Use your arrow keys to navigate to the appropriate drive that Zorin OS is installed on (Not the partition, just the drive) and select it to highlight, then hit enter.
Once complete, run

sudo update-grub

If all is well at this point, then you can run

sudo apt clean && sudo apt autoremove

There was Another POP-UP for distribution upgrade, Now its asking for Upgrading. Should I Proceed?

NO.
That will break Zorin OS.
That combined with your Grub error definitely suggests that at some point, you installed a script that modified critical system files in ways that they should not.

Proceeding with your Commands.

1 Like

Technically I did not, Zorin update Did.

I ran both these Command before.

1 Like

Believe me when I say, I am not accusing you of anything.
However, it is an important detail. I have checked with Artyom Zorin directly on this issue before and there is nothing in the repository, or according to the ZorinGroup, ever contained within the Zorin Updates that will alter the release-upgrader. This file is an Ubuntu File and disabled by default in Zorin OS (In order to prevent the system from "upgrading" to Ubuntu and removing Zorin OS).
There are some third-party customize tools that may tweak or modify System Files whether that was your intention to do so or not...
It helps to ask, because if you remember trying out some different tools, it may help us to undo the things that it did.

(Note: xfdashboard does not modify the system files in question, nor Grub).