How to uninstall graphics card drivers in Linux?
You can uninstall the graphics card driver in a Linux system by following these steps:
- Open the terminal window.
- Please input the following command to confirm the currently installed graphics card driver:
- List all packages installed through dpkg and search for the keyword “nvidia” in a case-insensitive manner.
- If the output shows the NVIDIA driver, it means the NVIDIA driver has been installed.
- Enter the following command to stop the X server:
- Stop the LightDM service using sudo.
- If the above command does not work, you can try the following command:
- Please stop the lightdm service using systemctl.
- Enter the following command to uninstall the NVIDIA driver:
- Remove all Nvidia packages using apt-get.
- This will uninstall all packages related to NVIDIA.
- Enter the following command to delete the configuration file of the NVIDIA driver:
- Please delete the file xorg.conf in the directory /etc/X11 using sudo.
- Enter the following command to restart the system:
- Restart the system with administrative privileges.
- The system will restart and use the default open-source graphics driver.
These steps are applicable to most Debian-based Linux distributions such as Ubuntu. For other Linux distributions, there may be some differences, so it is recommended to refer to the documentation or official support forums of that distribution for more specific guidance.