Score:1

"The following packages have been kept back not upgraded" Why and how do I solve it?

ru flag

I have some 'unmet dependencies'. I can't remove them, I can't upgrade them. I have googled and tried quite a few tricks(including: 'sudo apt-get --with-new-pkgs upgrade', 'sudo apt install packages-names', 'sudo apt-get dist-upgrade', sudo aptitude then '+' then 'g g'.., sudo apt install -f and some more) but still no luck! Need some help. Thanks in advance.

    Calculating upgrade... Done
The following packages have been kept back:
  libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386
  libdrm2 libdrm2:i386
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

sudo apt install libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386 libdrm2 libdrm2:i386
Reading package lists... Done
Building dependency tree       
Reading state information... 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:
 libdrm-amdgpu1 : Breaks: libdrm-amdgpu1:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-amdgpu1:i386 : Breaks: libdrm-amdgpu1 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm-intel1 : Breaks: libdrm-intel1:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-intel1:i386 : Breaks: libdrm-intel1 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm-nouveau2 : Breaks: libdrm-nouveau2:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-nouveau2:i386 : Breaks: libdrm-nouveau2 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm-radeon1 : Breaks: libdrm-radeon1:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm-radeon1:i386 : Breaks: libdrm-radeon1 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
 libdrm2 : Breaks: libdrm2:i386 (!= 2.4.107-1028) but 2.4.105-3~20.04.2 is to be installed
 libdrm2:i386 : Breaks: libdrm2 (!= 2.4.105-3~20.04.2) but 2.4.107-1028 is to be installed
E: Unable to correct problems, you have held broken packages.

Please have a look at the screenshot of my terminal. I am using Ubuntu 20.04.

Soren A avatar
mx flag
Please don't make screenshots of text. Copy and paste the text into the question and format it properly. That make it easier for us to read and search..
Soren A avatar
mx flag
Why do you have both normal (64 bit) and i386 (32 bit) packages installed ?
Rajib Paul avatar
ru flag
I have both 64 and 32 bit installed because I installed Steam for a game though I didn't install a game yet just Steam and it requires both 64 and 32.
Rajib Paul avatar
ru flag
I just copied and pasted all the necessary text here, hope that's alright @Soren A
karel avatar
sa flag
Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages)
Rajib Paul avatar
ru flag
No, I have tried all of the tricks before I asked here. Thanks for the help.
Score:0
ru flag

I have got that problem solved, by removing all 32bit apps along with the architecture and then I dist-upgrade:

sudo aptitude purge `dpkg --get-selections | grep ":i386" | awk '{print $1}'
sudo dpkg --remove-architecture i386
sudo dpkg --print-foreign-architectures
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade 

sudo apt-get purge ".*:i386"
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade

Though now a new error is showing at update:

E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1683 (packagekitd)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/

So I have to run sudo service packagekit restart every-time of update I don't know why!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.