set -x
echo "1. uninstall nvidia GPU driver"
echo "---------------------------------------------------------"
apt-get --purge remove nvidia-* -y 
apt remove needrestart -y 
apt autoremove -y 


echo "2. update and reboot"
echo "---------------------------------------------------------"
export DEBIAN_FRONTEND=noninteractive
apt update 
apt upgrade -y
reboot
