Linux removing nvidia driver

How do you remove Nvidia’s proprietary drivers? [duplicate]

If you type that into the terminal, it will remove the propriatry drivers and go back to the stock drivers. I was having a similar issue and reformed the other day to figure out that the issues seem to be from the latest propriatary drivers. Once I uninstalled it and rebooted, everything was back to normal. Hope it helps!

to uninstall NVIDIA,then install Ubuntu Desktop

sudo apt-get remove --purge nvidia-* sudo apt-get install ubuntu-desktop sudo rm /etc/X11/xorg.conf echo 'nouveau' | sudo tee -a /etc/modules 

Thanks a bunch! NVidia drivers are crashing on Lenovo P50 and that causes login failure. I would suggest —reinstall for 2nd line and 3rd line is probably not required?

I recently installed the 310 drivers from NVidia and it also crashed my system. I found this link helpful:

The following is from the above link:

First solution Press the key combination Ctrl + Alt + F1 to enter the emergency terminal. Log in with your username and password and type:

sudo apt-get install linux-source sudo apt-get install linux-headers-3.5.0-17-generic 

Now uninstall the current driver:

sudo apt-get remove nvidia-current 

If it does not, try the command:

sudo apt-get remove nvidia-current-updates 
sudo apt-get remove nvidia-experimental-304 
sudo apt-get remove nvidia-experimental-310 

reinstall now (yes, it looks like a joke almost mockingly):

sudo apt-get install nvidia-current-updates 

If everything is successful, type:

And when you restart you should have solved!

In my Case I am on a Desktop and my NVIDIA graphics card failed permanently. So I bought an ATI graphics card and could not boot into Ubuntu. To get my machine able to boot into Ubuntu I had to go to the Recovery Console, Make it Read/Write and remove the NVIDIA drivers. You might have to hold Shift down while booting to get the GRUB option for Recovery Console. I used the following commands after Dropping to a Root Shell Prompt from the Recovery Console:

mount -n -o remount,rw / apt-get purge nvidia-current rm /etc/X11/xorg.conf reboot now 

In my case, this was not enough, since I installed ‘NVIDIA-Linux-x86-310.44’, previously. I believe it is the main reason why it breaks my unity-3d when the normal updated occur, something between the drivers and the compiled kernel was probably out of sync.

Читайте также:  Посмотреть порты usb linux

I did all the remove stuff:

Log on as my usual user, then do a ‘sudo -i’, this way I do not have to enter my password all the time and did :

 apt-get remove nvidia-current-updates apt-get remove nvidia-current shutdown now -r 

Login directly from the console as my usual user, redo a ‘sudo -i’, went to the subdirectory where I downloaded ‘NVIDIA-Linux-x86-310.44.run’ file. And reinstalled using ‘sh NVIDIA-Linux-x86-310.44.run’, I answered to recompile. For sure I has numerous number of errors. But at the end it works and gave me back my unity-3d.

Good luck to others who had the same issues lately.

Источник

How can I uninstall a nvidia driver completely ?

As expected, Nvidia drivers have reduced my customizations. I can’t login to Unity 3D session. I can’t find any content to help me to uninstall the driver and I don’t know what to do as I have never uninstalled them before.

7 Answers 7

For Ubuntu 12.04-22.04

Commands can be executed to terminal. You can open a terminal with Ctrl + Alt + T keys combo.

If you remove —purge the nvidia driver you will be OK. No need to blacklist something, but sometimes maybe a force-load of the nouveau module needed.

First uninstall completely the driver.

Search what packages from nvidia you have installed.

except the package nvidia-common all other packages should be purged.

If you want to be sure that you will purge everything related to nvidia you can give this command

sudo apt-get remove --purge '^nvidia-.*' 

the .* in the end means (Purge everything that begins ( ^ ) with the name nvidia- )

above command will also remove the nvidia-common package and the nvidia-common package has as a dependency the ubuntu-desktop package.

So after above command you should also give the installation command for ubuntu-desktop package

sudo apt-get install ubuntu-desktop 

Also sometimes the nouveau driver get blacklisted from nvidia driver. With purge command it should UN-blacklisted. If you want to be sure that nouveau will be load in boot, you can force-load it by add it to /etc/modules

echo 'nouveau' | sudo tee -a /etc/modules 

Last , search for the xorg.conf file and remove it as well

sudo apt-get remove --purge '^nvidia-.*' sudo apt-get install ubuntu-desktop sudo rm /etc/X11/xorg.conf echo 'nouveau' | sudo tee -a /etc/modules 

Although all above commands not needed, this is my way to completely purge the nvidia driver and use the open source nounveau.

Читайте также:  Linux bash argument list

Your recipe just solved for me a similar problem that kept me last night fiddling with my computer until 3 am. Not enough thanks.

On my Ubuntu 16.04 LTS there is no nvidia-common package so the extra step of sudo apt-get install ubuntu-desktop can be omitted. Also there is no /etc/X11/xorg.conf file. Running locate xorg.conf reveals many files.

I just used the nvidia-uninstall.

In my case I got the driver directly from the nvidia website.

Thank you so much for saving my system! If this hadn’t worked, I would have probably had to reinstall my entire system.

@InfiniteLoops, that must be caused by you installing the drivers from repository. The driver that’s installed from NVidia website does have the nvidia-uninstall command in 2019.

I realize that this is an old answer, but I have to add an answer here for sake of clarity and system stability.

First off, the * is an expansion operator for the shell which will grab everything and remove a lot of files you don’t need to remove. The safest way to remove the nvidia driver is to do

Search for nvidia-xxx.xx version or nvidia-driver-xxx.xx version and then type

$ sudo apt purge nvidia-xxx.xx 
$ sudo apt purge nvidia-driver-xxx.xx 

It will only remove that package but will also flag its dependencies for removal.

To remove the dependencies is easy.

$ sudo apt autoremove $ sudo apt autoclean 

So for example, if you have the 390.xx package installed, it would be.

$ dpkg -l | grep -i nvidia ii libnvidia-cfg1-390:amd64 390.48-0ubuntu3 amd64 NVIDIA binary OpenGL/GLX configuration library ii libnvidia-common-390 390.48-0ubuntu3 all Shared files used by the NVIDIA libraries ii libnvidia-compute-390:amd64 390.48-0ubuntu3 amd64 NVIDIA libcompute package ii libnvidia-compute-390:i386 390.48-0ubuntu3 i386 NVIDIA libcompute package ii libnvidia-decode-390:amd64 390.48-0ubuntu3 amd64 NVIDIA Video Decoding runtime libraries ii libnvidia-decode-390:i386 390.48-0ubuntu3 i386 NVIDIA Video Decoding runtime libraries ii libnvidia-encode-390:amd64 390.48-0ubuntu3 amd64 NVENC Video Encoding runtime library ii libnvidia-encode-390:i386 390.48-0ubuntu3 i386 NVENC Video Encoding runtime library ii libnvidia-fbc1-390:amd64 390.48-0ubuntu3 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library ii libnvidia-fbc1-390:i386 390.48-0ubuntu3 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library ii libnvidia-gl-390:amd64 390.48-0ubuntu3 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD ii libnvidia-gl-390:i386 390.48-0ubuntu3 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD ii libnvidia-ifr1-390:amd64 390.48-0ubuntu3 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library ii libnvidia-ifr1-390:i386 390.48-0ubuntu3 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library ii nvidia-compute-utils-390 390.48-0ubuntu3 amd64 NVIDIA compute utilities ii nvidia-dkms-390 390.48-0ubuntu3 amd64 NVIDIA DKMS package ii nvidia-driver-390 390.48-0ubuntu3 amd64 NVIDIA driver metapackage ii nvidia-kernel-common-390 390.48-0ubuntu3 amd64 Shared files used with the kernel module ii nvidia-kernel-source-390 390.48-0ubuntu3 amd64 NVIDIA kernel source package ii nvidia-prime 0.8.8 all Tools to enable NVIDIA's Prime ii nvidia-settings 390.42-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver ii nvidia-utils-390 390.48-0ubuntu3 amd64 NVIDIA driver support binaries ii xserver-xorg-video-nvidia-390 390.48-0ubuntu3 amd64 NVIDIA binary Xorg driver 
$ apt-cache search nvidia | grep driver nvidia-settings - Tool for configuring the NVIDIA graphics driver ubuntu-drivers-common - Detect and install additional Ubuntu driver packages vdpau-driver-all - Video Decode and Presentation API for Unix (driver metapackage) xserver-xorg-video-nouveau - X.Org X server -- Nouveau display driver nvidia-340-dev - NVIDIA binary Xorg driver development files nvidia-384 - Transitional package for nvidia-driver-390 nvidia-384-dev - Transitional package for nvidia-driver-390 nvidia-driver-390 - NVIDIA driver metapackage nvidia-utils-390 - NVIDIA driver support binaries xserver-xorg-video-nvidia-390 - NVIDIA binary Xorg driver bumblebee-nvidia - NVIDIA Optimus support using the proprietary NVIDIA driver kubuntu-driver-manager - Driver Manager for Kubuntu kubuntu-driver-manager-dbg - Driver Manager for Kubuntu -- debug symbols nvidia-common - transitional package for ubuntu-drivers-common nvidia-304 - NVIDIA legacy binary driver - version 304.137 nvidia-304-dev - NVIDIA binary Xorg driver development files nvidia-340 - NVIDIA binary driver - version 340.107 nvidia-387-dev - Transitional package for nvidia-driver-390 nvidia-387 - Transitional package for nvidia-driver-390 nvidia-390-dev - Transitional package for nvidia-driver-390 nvidia-390 - Transitional package for nvidia-driver-390 nvidia-driver-396 - NVIDIA driver metapackage nvidia-utils-396 - NVIDIA driver support binaries xserver-xorg-video-nvidia-396 - NVIDIA binary Xorg driver 

Once you’ve targeted the package to remove, do

$ sudo apt purge nvidia-390 (nvidia-driver-XXX) -y $ sudo apt autoremove -y $ sudo apt autoclean 

Make sure to install whatever driver you plan on using right after you do this and if you don’t have livepatch because of whatever reason, just reboot your system and you should be good to go.

Читайте также:  Unifi controller linux server

This way you don’t ever have to worry about removing system dependencies while clearing out your drivers. You’ll have a sane and stable system afterwards and don’t have to worry about re-installing other packages that your system may depend on. That’s apt s job, not yours.

Источник

Оцените статью
Adblock
detector