2. Uninstall NVIDIA CUDA Toolkit 12.1 on Fedora 38/37

2.1 Change root user

su -
## OR ##
sudo -i

2.2 Run NVIDIA CUDA Uninstall Script

/usr/local/cuda/bin/cuda-uninstaller

03-nvidia-cuda-uninstall.png

2.3 Remove /etc/profile.d/cuda.sh

rm /etc/profile.d/cuda.sh

Then logout/login get NVIDIA CUDA away from PATH and LD_LIBRARY_PATH.