
In this guide, we will walk you through the process of removing manually installed GPU drivers on Ubuntu 18.04. This procedure is essential when you want to revert to default drivers or when you want to upgrade your drivers.
To remove manually installed GPU drivers in Ubuntu 18.04, you need to uninstall the driver using the nvidia-uninstall
command, purge all Nvidia-related packages, run the uninstaller from the installer file, update your system, and reboot your system.
Prerequisites
Before we begin, ensure that you have administrative access to your Ubuntu system. You will need to execute commands with superuser privileges.
Step 1: Uninstall the Manually Installed Driver
Firstly, you need to uninstall the manually installed driver. You can do this by executing the nvidia-uninstall
command in your terminal.
sudo nvidia-uninstall
The sudo
command is used to execute the command that follows with superuser privileges. The nvidia-uninstall
command is a utility that helps in uninstalling Nvidia drivers.
Step 2: Purge All Nvidia-related Packages
Next, you need to purge all Nvidia-related packages from your system. This can be done using the apt-get remove
command followed by the --purge
option and the package name.
sudo apt-get remove --purge nvidia-*
sudo apt-get remove --purge libnvidia-*
The apt-get remove
command is used to remove packages from the system. The --purge
option is used to remove the configuration files for packages. The asterisk (*
) is a wildcard that matches all packages starting with ‘nvidia-‘ or ‘libnvidia-‘.
Step 3: Run the Uninstaller
Now, run the uninstaller from the file you used to install the manual driver. Replace NVIDIA-Linux-x86_64-418.43.run
with the name of your installer file.
sudo NVIDIA-Linux-x86_64-418.43.run --uninstall
The --uninstall
option is used to remove the Nvidia driver installed by the script.
Step 4: Update Your System
After removing the packages, update your system using the apt-get update
command.
sudo apt-get update
This command is used to update the list of packages and their versions on your system.
Step 5: Reboot Your System
Finally, reboot your system to apply the changes.
sudo reboot
Troubleshooting
If you still see the manually installed driver as “manually installed” in the “Additional Drivers” tab, follow these additional steps.
Check for Remaining Nvidia Packages
Use the dpkg -l
command to check for any remaining Nvidia packages.
dpkg -l | grep -i 'nvidia'
The dpkg -l
command is used to list all installed packages, and the grep -i 'nvidia'
command is used to filter out Nvidia-related packages. If any packages are listed, remove them using the apt-get remove --purge
command.
Delete the xorg.conf File
If the xorg.conf
file exists, delete it using the rm
command.
sudo rm /etc/X11/xorg.conf
The /etc/X11/xorg.conf
file is a configuration file for the X.Org X server. It may contain settings that are causing the issue.
Reboot Your System
Finally, reboot your system to apply the changes.
sudo reboot
If the issue persists, consider seeking further assistance from the Ubuntu community or reinstalling the operating system.
Conclusion
In this guide, we have shown you how to remove manually installed GPU drivers on Ubuntu 18.04. Remember to always exercise caution when removing GPU drivers as it can affect system stability.
Yes, you can remove manually installed GPU drivers without any issues by following the steps outlined in this guide. However, it is always recommended to exercise caution and make sure you have a backup of important data before making any changes to your system.
You will need administrative access to execute commands with superuser privileges. If you don’t have administrative access, you may need to contact the system administrator or obtain the necessary permissions to perform the driver removal process.
Removing GPU drivers should not affect your system’s performance negatively. However, if you are planning to revert to default drivers or upgrade your drivers, it is recommended to install the appropriate drivers for optimal performance.
Yes, you can reinstall the manually installed GPU drivers after removing them if needed. Simply follow the installation process provided by the driver’s documentation or the manufacturer’s website.
After following the removal steps, you can check if the GPU drivers have been successfully removed by running the command nvidia-smi
in the terminal. If the command does not display any information or returns an error, it indicates that the drivers have been successfully removed.
If you encounter any errors or issues during the removal process, you can try troubleshooting steps such as checking for remaining Nvidia packages, deleting the xorg.conf
file, and rebooting your system. If the issue persists, consider seeking further assistance from the Ubuntu community or reinstalling the operating system.
These steps are specific to Ubuntu 18.04. While the general process may be similar for other Linux distributions, the commands and package names may vary. It is recommended to refer to the documentation or support resources for your specific Linux distribution for accurate instructions on removing GPU drivers.