Uninstall Nvidia Driver Linux

Removing an Nvidia driver from a Linux system can be a bit tricky, but it’s a task that can be accomplished through the terminal. The process might vary slightly depending on your Linux distribution, but the general steps should be applicable across most distributions. Here’s how you can uninstall an Nvidia driver on a Linux system:
Method 1: Using the Package Manager
First, you need to identify which package manager your Linux distribution uses. The most common ones are apt
(for Debian, Ubuntu, and derivatives), dnf
or yum
(for Fedora, CentOS, and RHEL), and pacman
(for Arch Linux).
For Debian/Ubuntu and Derivatives
- Open a Terminal: Press
Ctrl+Alt+T
or use your distribution’s method to open a terminal. - List Installed Nvidia Packages: Before uninstalling, it’s useful to see what Nvidia packages are installed. You can do this by running:
This command lists all installed packages with “nvidia” in their name.dpkg -l | grep -i nvidia
- Uninstall Nvidia Packages: To remove the Nvidia drivers, you can use the following command. Replace
package-name
with the actual name of the Nvidia package you wish to remove, as identified in the previous step:
Alternatively, if you want to remove all Nvidia packages and their configurations, you can use:sudo apt remove --purge package-name
sudo apt remove --purge ^nvidia
- Autoremove Unused Packages: After uninstalling, you can remove any packages that were automatically installed to satisfy dependencies but are no longer needed:
sudo apt autoremove
For Fedora/CentOS/RHEL
- Open a Terminal.
- List Installed Nvidia Packages:
or for older systems usingdnf list installed | grep -i nvidia
yum
:yum list installed | grep -i nvidia
- Uninstall Nvidia Packages: Replace
package-name
with the actual package name:
or forsudo dnf remove package-name
yum
:
To remove all related Nvidia packages (usingsudo yum remove package-name
dnf
), you might need to explicitly list and remove them.
Method 2: Using Nvidia’s Uninstall Script
If you installed the Nvidia driver using the .run
file provided by Nvidia, you can uninstall it by running the installer again with the --uninstall
option.
- Open a Terminal.
- Navigate to the Directory where the Nvidia installer is located (if you still have it):
cd /path/to/nvidia-installer
- Uninstall the Driver:
Replacesudo sh./NVIDIA-Linux-x86_64-xxx.xx.run --uninstall
./NVIDIA-Linux-x86_64-xxx.xx.run
with the path to your actual Nvidia installer file.
Final Steps
- Reboot Your System to ensure the changes take effect:
sudo reboot
- After uninstalling the Nvidia driver, your system will likely default to using the open-source Nouveau driver if available, or a fallback VESA driver. If you wish to install a different version of the Nvidia driver or switch to the Nouveau driver, you’ll need to do that separately.
Remember, the specific commands and steps can vary slightly depending on your Linux distribution and how you originally installed the Nvidia driver. Always refer to your distribution’s documentation for the most accurate and up-to-date information.