cannot uninstall nvidia 390.116 on ubuntu 18.04

Hi,

I have a Geforce 1080 ti card in my desktop PC that is running Ubuntu 18.04.
I wanted to move from my current 390.116 driver to the 418 one as I want to try out Tensorflow 2.0 with CUDA 10.
However, already when I try to run sudo apt-get purge nvidia* to uninstall my current driver I get the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
E: Couldn't find any package by glob 'nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb'
E: Couldn't find any package by regex 'nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb'

What do I need to do to be able to successfully uninstall my current driver?

Any help on this would be highly appreciated.

Best regards,

Max

Some more info.

$ sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'nvidia-machine-learning-repo-ubuntu1804' instead of './nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb'
nvidia-machine-learning-repo-ubuntu1804 is already the newest version (1.0.0-1).
The following package was automatically installed and is no longer required:
  libllvm6.0:i386
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I strongly suspect that you’re running the command

sudo apt-get purge nvidia*

while being in the directory containing the nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb file. Just remove it and also any files beginning with ‘nvidia’. Or just change to an empty directory.
BTW, why are you purging everything and not just upgrade the driver?

1 Like

Hi generix,

thanks for responding so quickly.
I did not know that you could also update the driver.
The guides I found online all recommended to purge the old driver before installing the new one using the ppa:graphics-drivers repository

How would I update the driver and could that cause any complications down the line when I install CUDA 10 and libcudnn7 for Tensorflow 2.0?

If you installed the 390 driver from the Ubuntu repos, you can just add the ppa and either select the 418/430 driver from the Software&drivers application or run
sudo apt install nvidia-driver-430
If you have previously installed the driver via .run installer downloaded from nvidia website, uninstall it first using the --uninstall option.
The only pitfall is to install cuda:

  • download the cuda .deb
  • add the repo to your system (first three steps from install instructions on download page)
  • don’t install cuda
  • instead, run sudo apt install cuda-toolkit-10-0 (for cuda 10.0, -10-1 for cuda 10.1)
    Otherwise, you would overwrite the driver from ppa with the one bundled with the cuda .deb.

I installed it from the Ubuntu repos. So I will try what you suggest tomorrow and will get back to you on how it went.

Thanks a lot for your help so far!

This worked, thanks a lot.
But still I have a bunch of unused libraries related to the older 386 driver.
Should I remove them?

libbsd0:i386 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386
  libedit2:i386 libelf1:i386 libexpat1:i386 libffi6:i386 libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386 libglvnd0:i386
  libglx-mesa0:i386 libglx0:i386 libllvm6.0:i386 libllvm7:i386 libnvidia-common-390 libpciaccess0:i386 libsensors4:i386
  libstdc++6:i386 libwayland-client0:i386 libwayland-server0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386
  libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386
  libxext6:i386 libxfixes3:i386 libxshmfence1:i386

Those are not related to the nvidia 390 driver (excluding libnvidia-common-390 but that doesn’t matter) it’s i386 meaning 32bit compatibility libraries. Those are needed for running 32bit applications.

I am getting this error while doing the same…

while entering the cammond like : sudo apt install nvidia-driver-418

Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
nvidia-dkms-418 : Depends: nvidia-kernel-common-418 but it is not going to be installed
nvidia-driver-418 : Depends: libnvidia-gl-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: nvidia-dkms-418 (= 418.56-0ubuntu0~gpu18.10.1) but 418.40.04-0ubuntu1 is to be installed
Depends: nvidia-kernel-source-418 (= 418.56-0ubuntu0~gpu18.10.1) but 418.40.04-0ubuntu1 is to be installed
Depends: libnvidia-compute-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: nvidia-compute-utils-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: libnvidia-decode-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: libnvidia-encode-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: nvidia-utils-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: xserver-xorg-video-nvidia-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: libnvidia-cfg1-418 (= 418.56-0ubuntu0~gpu18.10.1) but 418.40.04-0ubuntu1 is to be installed
Depends: libnvidia-ifr1-418 (= 418.56-0ubuntu0~gpu18.10.1) but it is not going to be installed
Depends: libnvidia-fbc1-418 (= 418.56-0ubuntu0~gpu18.10.1) but 418.40.04-0ubuntu1 is to be installed
Recommends: libnvidia-compute-418:i386 (= 418.56-0ubuntu0~gpu18.10.1)
Recommends: libnvidia-decode-418:i386 (= 418.56-0ubuntu0~gpu18.10.1)
Recommends: libnvidia-encode-418:i386 (= 418.56-0ubuntu0~gpu18.10.1)
Recommends: libnvidia-ifr1-418:i386 (= 418.56-0ubuntu0~gpu18.10.1)
Recommends: libnvidia-fbc1-418:i386 (= 418.56-0ubuntu0~gpu18.10.1)
Recommends: libnvidia-gl-418:i386 (= 418.56-0ubuntu0~gpu18.10.1)
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

1 Like