Files
shellscripts/uninstall_nvidia.sh
Your Name b00f025742 update
2024-11-12 00:07:46 +08:00

27 lines
752 B
Bash

#!/bin/bash
# ! This script assumes you're using a Debian-based system like Ubuntu.
# Set execution permissions: chmod +x uninstall_nvidia.sh
# Run script: sudo ./uninstall_nvidia.sh
echo "Identifying installed NVIDIA packages..."
dpkg --list | grep nvidia
echo "Purging NVIDIA packages..."
sudo apt-get purge nvidia-*
echo "Removing leftover NVIDIA configuration files..."
sudo apt-get autoremove
# Optional: Install a specific version of the NVIDIA driver
# Uncomment and replace <version_number> with your desired version.
# echo "Installing NVIDIA driver version <version_number>..."
# sudo apt-get install nvidia-driver-<version_number>
echo "Cleaning up..."
sudo apt-get autoclean
sudo apt-get clean
echo "Rebooting system..."
sudo reboot