Linux Mint

How to Clean Install the NVIDIA Drivers on Linux Mint 21

While installing the official NVIDIA drivers on Linux Mint 21, things may go wrong in many ways. This may result in the official NVIDIA drivers not working on your computer/laptop. Or, in the worst-case scenario, break the operating system and show you a black screen.

To solve this problem, you can try to uninstall the official NVIDIA drivers completely from your Linux Mint 21 operating system and try to install the official NVIDIA drivers again.

In this article, we will show you how to uninstall the official NVIDIA drivers from Linux Mint 21 completely using the graphical user interface and from the command line (in case you see a black screen).

Table of Contents:

  1. Uninstalling the Official NVIDIA Drivers from Linux Mint via the Graphical User Interface
  2. Completely Uninstalling the Official NVIDIA Drivers from Linux Mint Using the Command Line
  3. Re-installing/Clean Installing the Official NVIDIA Drivers on Linux Mint
  4. Conclusion

Uninstalling the Official NVIDIA Drivers from Linux Mint via the Graphical User Interface

You can uninstall the official NVIDIA drivers from Linux Mint graphically using the Driver Manager app.

You can open the Driver Manager app from the Application Menu of Linux Mint 21.

In the Driver Manager app, you should see that the official NVIDIA drivers are being used.

Graphical user interface, text, application Description automatically generated

To uninstall the official NVIDIA drivers and switch to the open-source Nouveau drivers (which you need to see the video output on your monitor), select xserver-xorg-video-nouveau (open-source)[1] and click on Apply Changes[2].

Text Description automatically generated with medium confidence

To confirm the action, type in your login password[1] and click on Authenticate[2].

Graphical user interface, text, application Description automatically generated

The official NVIDIA drivers are being uninstalled. It takes a few seconds to complete.

Graphical user interface, text, application Description automatically generated

Once the official NVIDIA drivers are uninstalled and Linux Mint 21 switches to the open-source Nouveau drivers, click on Restart… to restart your computer/laptop for the changes to take effect.

Graphical user interface, text, application, chat or text message Description automatically generated

Once your computer/laptop starts, you should see that the nouveau kernel modules are used instead of the official nvidia kernel modules. So, the official NVIDIA drivers are successfully uninstalled and Linux Mint 21 is successfully switched to the open-source Nouveau drivers.

Text Description automatically generated

Completely Uninstalling the Official NVIDIA Drivers from Linux Mint Using the Command Line

You can completely uninstall the official NVIDIA drivers from the command line on Linux Mint 21. First, open a Terminal app on Linux Mint from the Application menu or press <Ctrl> + <Alt> + T. Then, update the APT package repository cache with the following command:

$ sudo apt update

Text Description automatically generated

To completely remove the official NVIDIA drivers from Linux Mint, run the following command:

$ sudo apt remove nvidia-* --purge

Graphical user interface, text, application Description automatically generated

To confirm the uninstallation, press Y and then press <Enter>.

Text Description automatically generated

The official NVIDIA drivers are being uninstalled. It takes a while to complete.

Text Description automatically generated

At this point, the official NVIDIA drivers should be uninstalled.

Text Description automatically generated

To remove the dependency packages of the official NVIDIA drivers, run the following command:

$ sudo apt autoremove --purge

Graphical user interface Description automatically generated

To confirm the action, press Y and then press <Enter>.

Text Description automatically generated

The dependency packages of the official NVIDIA drivers are being removed. It takes a while to complete.

At this point, all the dependency packages of the official NVIDIA drivers should be removed.

Text Description automatically generated

Run the following command to delete all the cached NVIDIA drivers packages along with the dependency packages to save disk space:

$ sudo apt clean

Graphical user interface, text, application Description automatically generated

For the changes to take effect, run the following command to restart your computer/laptop:

$ sudo reboot

Graphical user interface, text, application Description automatically generated

Once your computer/laptop starts, you should see that the nouveau kernel modules are used instead of the official nvidia kernel modules. So, the official NVIDIA drivers are uninstalled completely and Linux Mint 21 is successfully switched to the open-source Nouveau drivers.

Text Description automatically generated

Re-installing/Clean Installing the Official NVIDIA Drivers on Linux Mint

At this point, the official NVIDIA drivers should be completely uninstalled from Linux Mint 21. Now, you can try to install the official NVIDIA drivers on Linux Mint 21 again. If you need any assistance in installing the official NVIDIA drivers on Linux Mint 21, check the article on How to Install the NVIDIA Drivers on Linux Mint 21.

Conclusion

We showed you how to completely uninstall the official NVIDIA drivers from Linux Mint 21 using the graphical user interface and from the command line in case you see a black screen. Although, you can uninstall the official NVIDIA drivers from Linux Mint 21 graphically and from the command line, we recommend the command line method.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.