1. Home
  2. Linux

How to disable and remove Nvidia drivers on Ubuntu

The proprietary Nvidia driver is essential to Ubuntu users looking to play video games. However, if you are a gamer, there is no need to have this driver installed, as the open-source one works just fine.

Uninstalling the Nvidia driver on Ubuntu is tough, especially for those new to Ubuntu. So, please follow along with this guide to learn how to uninstall the Nvidia driver.

Note: in this guide, we assume you are using Ubuntu’s Gnome desktop environment. If you use Xubuntu, Kubuntu, or another Ubuntu spin, you will still be able to follow along with the instructions, but some of the steps may change.

Disable Nvidia drivers GUI

Disabling your Nvidia drivers on Ubuntu is easiest done with the built-in GUI. The reason? The driver GUI in Ubuntu is quite polished, has a simple UI, and even your grandmother could figure it out. If you’re trying to figure out how to uninstall the Nvidia drivers so you can go back to the open-source ones, follow the step-by-step instructions below.

Step 1: Press the Win (windows key) on your keyboard. By pressing this key, you will bring up Ubuntu’s desktop search area. In the desktop search area, type out the search term “Software & Updates.” As you type, it should show up in the search results.

Step 2: Click on the “Software & Updates” icon in the search results to open up Ubuntu’s Software & Updates app.

Step 3: Inside of the “Software & Updates” app, you will see several different tabs available to click on. These tabs are “Ubuntu Software,” “Other Software,” “Updates,” “Authentication,” “Additional Drivers,” and “Developer Options.” Select the “Additional Drivers” tab with the mouse to access your Ubuntu PC’s proprietary drivers panel.

Step 4: In the “Additional Drivers” tab, you should see all of the devices on your Ubuntu PC that require third-party drivers.

Look through the list of devices for one that says “NVIDIA Corporation.” The “NVIDIA Corporation” one is your graphics card.

Step 5: Select the box next to “Using X.Org x server – Noveau display driver.” This option is the open-source Nvidia driver.

By selecting this option, your graphics card will de-select the Nvidia graphics driver option and start to install/reinstall the open-source driver in its place. During this process, it is essential to be patient. Switching graphics drivers can take a bit of time. Do not shut off your computer or close the Software & Updates window!

Step 6: When your Nvidia driver is done uninstalling through Software & Updates, you will see a message in the window that says, “No proprietary drivers are in use.”

With the proprietary Nvidia driver successfully removed, locate the “Close” button in the bottom right portion of the window and click on it with the mouse to close the Software & Updates app.

Step 7: Once the Software & Updates app is closed, the process of removing the Nvidia driver from your Ubuntu PC is taken care of. Now you must reboot your PC.

To reboot, find the power off button, and select it with the mouse. Then, click the “Restart” option.  Or, launch a terminal window and run the sudo reboot command.

Upon logging back in from the reboot, you will no longer be using the Nvidia driver on your system!

Uninstalling Nvidia drivers command-line

Those that prefer to use the command-line in Ubuntu will be happy to know that it is possible to uninstall all of the Nvidia drivers from the system in the Linux terminal. To start the uninstallation process, launch a terminal by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, follow the step-by-step instructions outlined below.

Step 1: Before attempting to uninstall the Nvidia driver, you should confirm that you indeed have it installed in the first place.

To determine if you have the Nvidia drivers installed on your system, make use of the dpkg -l command. It will list all installed Nvidia packages on Ubuntu.

dpkg -l | grep -i nvidia

Assuming Nvidia packages show up in the command output, you have Nvidia drivers installed on Ubuntu and can go forward with uninstallation. If not, discontinue this guide.

Step 2: Getting rid of the Nvidia drivers on Ubuntu requires making use of the purge flag. This flag will uninstall the Nvidia drivers from the system, but it will also erase all configuration files as well.

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

Step 3: Once the Nvidia drivers are purged from the system, you will need to reinstall the Ubuntu-desktop package, as it will have been uninstalled during step 2.

sudo apt install ubuntu-desktop

Step 4: By uninstalling the Nvidia driver from Ubuntu, you may find the open-source driver blacklisted. To fix this issue, make use of the following echo command.

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

Step 5: Lastly, you must remove the Xorg configuration file as it has Nvidia driver settings in it. To remove it, run the rm command.

sudo rm /etc/X11/xorg.conf

Once the Xorg configuration file is removed, reboot your Ubuntu PC. Upon logging back in, the Nvidia driver is removed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.