Debian 9 System. Cuda 8 was installed via nvidia-cuda-toolkit package. It seems nvidia driver (version 384) was also installed during the process.

Now I want to install new nvidia driver (v410) which is not available via apt. It is a .run file from nvidia website. To install the new version I need unstall the old version first. So my question is: how can I remove the old nvidia driver but keep the cuda toolkit? which package should I uninstall?

Here is the output from apt list --installed |grep nvidia:

glx-alternative-nvidia/now 0.8.3~deb9u1 amd64 [installed,upgradable to: 0.8.8~de b9u2] libnvidia-cfg1/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1] libnvidia-compiler/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1 ] libnvidia-fatbinaryloader/now 384.130-1 amd64 [installed,upgradable to: 390.87-8 ~deb9u1] libnvidia-ml1/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1] libnvidia-ptxjitcompiler1/now 384.130-1 amd64 [installed,upgradable to: 390.87-8 ~deb9u1] nvidia-alternative/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1 ] nvidia-cuda-dev/stable,now 8.0.44-4 amd64 [installed,automatic] nvidia-cuda-doc/stable,stable,now 8.0.44-4 all [installed,automatic] nvidia-cuda-gdb/stable,now 8.0.44-4 amd64 [installed,automatic] nvidia-cuda-toolkit/stable,now 8.0.44-4 amd64 [installed] nvidia-detect/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1] nvidia-installer-cleanup/stable,now 20151021+4 amd64 [installed,automatic] nvidia-kernel-common/stable,now 20151021+4 amd64 [installed,automatic] nvidia-kernel-dkms/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1 ] nvidia-kernel-support/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb 9u1] nvidia-legacy-check/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u 1] nvidia-libopencl1/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1] nvidia-modprobe/now 384.111-2~deb9u1 amd64 [installed,upgradable to: 390.87-1~de b9u1] nvidia-opencl-common/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9 u1] nvidia-opencl-dev/stable,now 8.0.44-4 amd64 [installed,automatic] nvidia-opencl-icd/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1] nvidia-persistenced/now 384.111-1~deb9u1 amd64 [installed,upgradable to: 390.87- 1~deb9u1] nvidia-profiler/stable,now 8.0.44-4 amd64 [installed,automatic] nvidia-smi/now 384.130-1 amd64 [installed,upgradable to: 390.87-8~deb9u1] nvidia-support/stable,now 20151021+4 amd64 [installed,automatic] nvidia-visual-profiler/stable,now 8.0.44-4 amd64 [installed,automatic]


1 Answer 1


Yes, you could but that would not mean the CUDA Toolkit would work properly with your new driver, or even your system. Not to mention that you would have the same problem all over again each time you want to upgrade your driver.

The metapackage cuda-toolkit is highly tied to nvidia-driver and its version. And it's true for others critical system packages.

This is why, among others things, on Debian, it is highly not recommended to install a 3rd-party nvidia-driver, in order to avoid breaking Debian.

I would highly recommend you to follow the proper way to install Nvidia driver and CUDA Toolkit, using the packages in Debian repositories.

If you want a more recent version, you should consider using the driver/toolkit in backports repositories.

As I am writing these lines, you can install the nvidia-driver, version 410.104-1, such as following.

Before you do anything else, remove everything:

# apt purge nvidia-*
Add backports repository to your sources.list:
# echo "deb http://httpredir.debian.org/debian stretch-backports main contrib non-free" > /etc/apt/sources.list
Update the packages cache:
# apt update
Install Linux headers for the kernel you are using:
# apt install linux-headers-$(uname -r|sed 's/[^-]*-[^-]*-//')
Install nvidia-driver package from the backports repository:
# apt-get install -t stretch-backports nvidia-driver
Install nvidia-cuda-toolkit metapackage from the backports repository:
# apt-get install -t stretch-backports nvidia-cuda-toolkit 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .