1

I have installed NVIDIA proprietary drivers (v450) and CUDA (v11) via this repository (which I installed by including it in my /etc/apt/sources.list.d directory), but I have now noticed that apt is suggesting to remove them because they are "no longer required". Specifically, when I do sudo apt upgrade (which does not produce any message) and then sudo apt upgrade, the latter command produces the following output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  cuda-command-line-tools-11-0 cuda-compiler-11-0 cuda-cudart-11-0 cuda-cudart-dev-11-0 cuda-cuobjdump-11-0 cuda-cupti-11-0 cuda-cupti-dev-11-0 cuda-documentation-11-0 cuda-driver-dev-11-0
  cuda-drivers-450 cuda-gdb-11-0 cuda-libraries-11-0 cuda-libraries-dev-11-0 cuda-memcheck-11-0 cuda-nsight-11-0 cuda-nsight-compute-11-0 cuda-nsight-systems-11-0 cuda-nvcc-11-0 cuda-nvdisasm-11-0
  cuda-nvml-dev-11-0 cuda-nvprof-11-0 cuda-nvprune-11-0 cuda-nvrtc-11-0 cuda-nvrtc-dev-11-0 cuda-nvtx-11-0 cuda-nvvp-11-0 cuda-samples-11-0 cuda-sanitizer-11-0 cuda-toolkit-11-0 cuda-tools-11-0
  cuda-visual-tools-11-0 dkms freeglut3 freeglut3-dev libcublas-11-0 libcublas-dev-11-0 libcufft-11-0 libcufft-dev-11-0 libcurand-11-0 libcurand-dev-11-0 libcusolver-11-0 libcusolver-dev-11-0
  libcusparse-11-0 libcusparse-dev-11-0 libglu1-mesa-dev libice-dev libnpp-11-0 libnpp-dev-11-0 libnvidia-cfg1-450 libnvidia-common-450 libnvidia-decode-450 libnvidia-encode-450 libnvidia-extra-450
  libnvidia-fbc1-450 libnvidia-gl-450 libnvidia-ifr1-450 libnvjpeg-11-0 libnvjpeg-dev-11-0 libsm-dev libxi-dev libxmu-dev libxmu-headers libxnvctrl0 libxt-dev nsight-compute-2019.4.0
  nsight-systems-2020.3.2 nvidia-compute-utils-450 nvidia-dkms-450 nvidia-driver-450 nvidia-kernel-common-450 nvidia-kernel-source-450 nvidia-modprobe nvidia-prime nvidia-settings nvidia-utils-450
  pkg-config screen-resolution-extra xserver-xorg-video-nvidia-450
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Furthermore, if I try to do sudo apt autoremove I get the following:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  cuda-command-line-tools-11-0 cuda-compiler-11-0 cuda-cudart-11-0 cuda-cudart-dev-11-0 cuda-cuobjdump-11-0 cuda-cupti-11-0 cuda-cupti-dev-11-0 cuda-documentation-11-0 cuda-driver-dev-11-0
  cuda-drivers-450 cuda-gdb-11-0 cuda-libraries-11-0 cuda-libraries-dev-11-0 cuda-memcheck-11-0 cuda-nsight-11-0 cuda-nsight-compute-11-0 cuda-nsight-systems-11-0 cuda-nvcc-11-0 cuda-nvdisasm-11-0
  cuda-nvml-dev-11-0 cuda-nvprof-11-0 cuda-nvprune-11-0 cuda-nvrtc-11-0 cuda-nvrtc-dev-11-0 cuda-nvtx-11-0 cuda-nvvp-11-0 cuda-samples-11-0 cuda-sanitizer-11-0 cuda-toolkit-11-0 cuda-tools-11-0
  cuda-visual-tools-11-0 dkms freeglut3 freeglut3-dev libcublas-11-0 libcublas-dev-11-0 libcufft-11-0 libcufft-dev-11-0 libcurand-11-0 libcurand-dev-11-0 libcusolver-11-0 libcusolver-dev-11-0
  libcusparse-11-0 libcusparse-dev-11-0 libglu1-mesa-dev libice-dev libnpp-11-0 libnpp-dev-11-0 libnvidia-cfg1-450 libnvidia-common-450 libnvidia-decode-450 libnvidia-encode-450 libnvidia-extra-450
  libnvidia-fbc1-450 libnvidia-gl-450 libnvidia-ifr1-450 libnvjpeg-11-0 libnvjpeg-dev-11-0 libsm-dev libxi-dev libxmu-dev libxmu-headers libxnvctrl0 libxt-dev nsight-compute-2019.4.0
  nsight-systems-2020.3.2 nvidia-compute-utils-450 nvidia-dkms-450 nvidia-driver-450 nvidia-kernel-common-450 nvidia-kernel-source-450 nvidia-modprobe nvidia-prime nvidia-settings nvidia-utils-450
  pkg-config screen-resolution-extra xserver-xorg-video-nvidia-450
0 upgraded, 0 newly installed, 78 to remove and 0 not upgraded.
After this operation, 4.960 MB disk space will be freed.
Do you want to continue? [Y/n]

I don't have a more recent version installed and I am quite sure these are the packages I am currently using. So, why is apt suggesting to do this, given that such action would almost certainly break something? Or am I missing something?

1 Answers1

0

Nvidia can do strange things with the dependencies, like making all the cuda stuff depend upon some (old) Nvidia driver they supply. Next Nvidia driver update removed the driver they depend upon, and makes them subject to autoremove. If you use the cuda deb, be prepared for this -- either just unpack the parts of the deb you want, or copy the cuda file, let the autoremove do its thing, and restore the cuda files.

Better is the run file method of cuda installation, where you can skip their Nvidia driver install, and just use the Ubuntu default one. Search this site for specific instructions for each approach. e.g. How do I install NVIDIA and CUDA drivers into Ubuntu?

ubfan1
  • 17,838