On doing sudo apt upgrade
, I get the following error (or warning, not sure what it is):
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libnvidia-cfg1-440 libnvidia-compute-440 libnvidia-compute-440:i386 libnvidia-decode-440 libnvidia-decode-440:i386 libnvidia-encode-440 libnvidia-encode-440:i386
libnvidia-extra-440 libnvidia-fbc1-440 libnvidia-fbc1-440:i386 libnvidia-gl-440 libnvidia-gl-440:i386 libnvidia-ifr1-440 libnvidia-ifr1-440:i386
nvidia-compute-utils-440 nvidia-driver-440 nvidia-kernel-common-440 nvidia-kernel-source-440 nvidia-utils-440 xserver-xorg-video-nvidia-440
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
I found the solution (run sudo apt install <package-name>
). I also found out why it does so. It is because the newer version has unmet dependencies.
But my doubt is, is it safe to do sudo apt install <package-name>
, or will the system take care of it in a few days. If so, then how many days would it take to resolve this on its own?
EDIT 1:
My current Nvidia Drivers are 440.
I solved safely with
apt full-upgrade
.There are normally four reasons why you may see this message:
The upgrade procedure needs to add packages: Use
--with-new-pkgs upgrade
. Without this,apt upgrade
won't add or remove new packages.The upgrade procedure needs to remove packages: Double-check your apt configuration, which packages will be removed, analyze the possible consequences, check your backups… and only then:
apt full-upgrade
. Will add or remove packages as necessary to complete the upgrade.Relevant packages are marked as held back:
sudo apt-mark showmanual | grep nvidia
(for e.g.), one of the listed packages are the trouble ones listed byapt upgrade
? In this case should be analyzed who/why these packages were marked like that.It depends on packages or versions that are not available: This might be a temporary issue or an apt misconfiguration.
Other notes
Unsure about using
full-upgrade
? Try it with--dry-run
. From apt manual:dist-upgrade
will not update the whole distribution (likedo-release-upgrade
). It is a misnomer.full-upgrade
is equivalent. Avoid usingdist-upgrade
.Use
apt
command, the friendly alternative toapt-get
.Sometimes
sudo ubuntu-drivers install
might try to downgrade your NVIDIA drivers. I'm not sure why.