9
The following packages have been kept back: grub-efi-amd64-signed

I have this error for a couple of weeks now. Does anyone know the reason why?

Edit:

sudo apt update
Reading package lists... Done                     
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
sudo apt upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
grub-efi-amd64-signed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
sudo apt dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
grub-efi-amd64-signed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
arctic-sea-otter
  • 103
  • 1
  • 1
  • 4

3 Answers3

11

Upgrade and update your repository packages and cache. Run these commands:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade

Update:

Run these commands one by one:

$ sudo apt install --reinstall grub
$ sudo apt install --reinstall grub2-common
$ sudo apt install --reinstall grub-efi-amd64
$ sudo apt install --reinstall grub-efi-amd64-bin
$ sudo apt autoremove
$ sudo apt install grub-efi-amd64-signed
L. D. James
  • 25,444
7

Just had a similar issue on ubuntu 22.04:

apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
The following packages have been kept back:
  grub-efi-amd64-bin grub-efi-amd64-signed
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

https://itsfoss.com/following-packages-have-been-kept-back/ describes the reason and the solution quite well:

Normally, when you run the sudo apt update and sudo apt upgrade commands, it updates all the installed packages to their available newer versions.

However, if the dependencies of an installed package have been changed such that it requires installation of new packages, the installed package won’t be upgraded with the system update and you’ll see package kept back error.

The solution is to run

sudo apt install --only-upgrade grub-efi-amd64-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  grub-efi-amd64-signed
The following packages will be upgraded:
  grub-efi-amd64-bin grub-efi-amd64-signed
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1.272 kB of archives.
After this operation, 15,4 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 grub-efi-amd64-signed amd64 1.182~22.04.1+2.06-2ubuntu10 [533 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 grub-efi-amd64-bin amd64 2.06-2ubuntu10 [740 kB]
Fetched 1.272 kB in 0s (3.210 kB/s)         
(Reading database ... 238324 files and directories currently installed.)
Preparing to unpack .../grub-efi-amd64-signed_1.182~22.04.1+2.06-2ubuntu10_amd64.deb ...
Unpacking grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) over (1.180+2.06-2ubuntu7) ...
Preparing to unpack .../grub-efi-amd64-bin_2.06-2ubuntu10_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.06-2ubuntu10) over (2.06-2ubuntu7) ...
Setting up grub-efi-amd64-bin (2.06-2ubuntu10) ...
Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ...
Trying to migrate /boot/efi into esp config
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
Installation finished. No error reported.
0

Were you using Livepatch?. It would appear to be a livepatch thing. I personally did the apt update, upgra, and apt-didt upgrade and just autoremoved all the unused Libs ... then ran Livepatch again... it appears to have cleared the issue. ?