我卸载了系统上的 nvidia 驱动程序:
$ sudo apt --purge remove nvidia-driver-470
但有一个包裹仍然孤零零的:
$ apt list --installed | grep nvidia
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libnvidia-compute-470/jammy,now 470.239.06-1pop0~1710862379~22.04~5a92c99 amd64 [installed,automatic]
如果我理解正确,使用apt rdepends
将显示另一个包是否依赖于这个包:
$ sudo apt rdepends libnvidia-compute-470
[sudo] password for david:
libnvidia-compute-470
Reverse Depends:
Depends: libnvidia-decode-470 (= 470.256.02-0ubuntu0.22.04.1)
Depends: nvidia-utils-470
Depends: nvidia-headless-no-dkms-470 (= 470.256.02-0ubuntu0.22.04.1)
Depends: nvidia-driver-470 (= 470.256.02-0ubuntu0.22.04.1)
Depends: nvidia-compute-utils-470
Depends: libnvidia-decode-470 (= 470.103.01-0ubuntu2)
Replaces: libnvidia-compute-470 (<< 390.25-0ubuntu2~)
Depends: libnvidia-compute-465
Depends: libnvidia-compute-460
Depends: nvidia-utils-470
Depends: nvidia-headless-no-dkms-470 (= 470.103.01-0ubuntu2)
Depends: nvidia-driver-470 (= 470.103.01-0ubuntu2)
Depends: nvidia-compute-utils-470
Replaces: libnvidia-compute-470 (<< 390.25-0ubuntu2~)
Replaces: libnvidia-compute-470 (<< 390.25-0ubuntu2~)
Depends: libnvidia-compute-465
Depends: libnvidia-compute-460
Depends: nvidia-utils-470
Depends: nvidia-headless-no-dkms-470 (= 470.239.06-1pop0~1710862379~22.04~5a92c99)
Depends: nvidia-driver-470 (= 470.239.06-1pop0~1710862379~22.04~5a92c99)
Depends: nvidia-compute-utils-470
Depends: libnvidia-decode-470 (= 470.239.06-1pop0~1710862379~22.04~5a92c99)
Depends: libnvidia-compute-430
Depends: libnvidia-compute-465
Depends: libnvidia-compute-460
Depends: libnvidia-compute-455
Depends: libnvidia-compute-450
Depends: libnvidia-compute-440
因此,如果我的解释正确,则只有其他 nvidia 软件包依赖于此软件包,并且没有安装其他 nvidia 软件包,那么为什么它仍然存在?apt
偶尔会错过一些东西吗?使用 删除此软件包安全吗sudo apt remove libnvidia-compute-470
?
编辑:这个问题并不是关于如何卸载 nvidia 驱动程序。它更多的是关于为什么 apt 会这样表现。