in linux/cuda_installer/os_installers/__init__.py [0:0]
def uninstall_driver(self):
"""
Uses the Nvidia installers to execute driver uninstallation. It will also unlock the kernel updates in the
system.
"""
if not self.verify_driver():
logger.info("GPU driver not found.")
return
installer_path = self.download_latest_driver_installer()
logger.info("Starting uninstallation...")
self.run(f"sh {installer_path} -s --uninstall", check=True)
logger.info("Uninstallation completed!")
self.unlock_kernel_updates()