How to install a specific version of a metapackage and its dependencies?

I’ll use the NVIDIA 460 driver as an example. Here’s what happens when I want to try to install version 460.67 instead of 460.80 (which is buggy, FYI).

$ apt-get install -s nvidia-driver-460=460.67-0ubuntu1
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
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 resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver-460 : Depends: libnvidia-gl-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: nvidia-dkms-460 (<= 460.67-1)
                     Depends: nvidia-kernel-common-460 (<= 460.67-1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: nvidia-kernel-source-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: libnvidia-compute-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: libnvidia-extra-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: nvidia-compute-utils-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: libnvidia-decode-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: libnvidia-encode-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: nvidia-utils-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: xserver-xorg-video-nvidia-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: libnvidia-cfg1-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: libnvidia-ifr1-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Depends: libnvidia-fbc1-460 (= 460.67-0ubuntu1) but 460.80-0ubuntu0.21.04.2 is to be installed
                     Recommends: nvidia-settings but it is not going to be installed
                     Recommends: nvidia-prime (>= 0.8) but it is not going to be installed
                     Recommends: libnvidia-compute-460:i386 (= 460.67-0ubuntu1)
                     Recommends: libnvidia-decode-460:i386 (= 460.67-0ubuntu1)
                     Recommends: libnvidia-encode-460:i386 (= 460.67-0ubuntu1)
                     Recommends: libnvidia-ifr1-460:i386 (= 460.67-0ubuntu1)
                     Recommends: libnvidia-fbc1-460:i386 (= 460.67-0ubuntu1)
                     Recommends: libnvidia-gl-460:i386 (= 460.67-0ubuntu1)
E: Unable to correct problems, you have held broken packages.

That’s only 1 example I can think of at the moment.

Do I have to list all of the packages I want to install?


Go to Source of this post
Author Of this post: YamiYukiSenpai
Title Of post: How to install a specific version of a metapackage and its dependencies?
Author Link: {authorlink}