Quickest, most efficient method to uninstall NVIDIA drivers including CUDA

Hi,

What is the most to the point and easy way to remove NVIDIA drivers (including CUDA) for reinstallation?

Thanks

it really depends on how you installed them—how did you?

If you installed them using RPM Fusion, you just uninstall the packages:

https://rpmfusion.org/Howto/NVIDIA#Uninstall_the_NVIDIA_driver

1 Like
sudo dnf install nvidia* akmod-nvidia xorg-x11-drv-nvidia*

(Via the terminal, of course)

1 Like

Change the install to erase and you are done.
I, though, would use

dnf erase *nvidia* 

as would erase everything nvidia related regardless of where it appears in the package name.

2 Likes

computersavvy saves the day again :+1: . ‘Dependencies resolved, Nothing to do, Complete!’

Thanks :smiley:

I had my hopes up that the problem had been solved, but no… Following a reboot the resoloution and aspect ratio have been locked.

[(User)@fedora ~]$ sudo dnf install nvidia* akmod-nvidia xorg-x11-drv-nvidia*
[sudo] password for (User): 
Last metadata expiration check: 2:07:41 ago on Mon 25 Oct 2021 15:43:17.
No match for argument: nvidia-bug-report.log.gz
Package xorg-x11-drv-nvidia-kmodsrc-3:470.74-1.fc34.x86_64 is already installed.
Error: Unable to find a match: nvidia-bug-report.log.gz

I really hope this does not end up getting too complex as it usually does.

To install the latest nvidia drivers with rpmfusion this is all you need
dnf upgrade to make sure you have the latest kernel then
dnf install akmod-nvidia

So, we don’t know what problem you’re trying to solve currently. You asked how the packages are to be installed, so that’s what folks are helping with.

What is the issue? Why the reinstallation? What is the current state of the system please?

RPM Fusion provides Nvidia drivers, so you follow the steps here:

https://rpmfusion.org/Howto/NVIDIA

and for CUDA, RPM Fusion notes these steps here:

https://rpmfusion.org/Howto/CUDA

1 Like

As regards the error with the nvidia-report.log.gz, you need to escape the nvidia* with something like nvidia\* or ‘nvidia*’ so the shell does not glob it with a file name that already exists in the directory where you are located.

1 Like

The issue is and the re-installation is due to compatibility problems with certain games that could be driver related. The current state of the system is fine other than the unusal aspect ratio and resolution that can not be changed.

None of the fixes you suggested worked, regretably. Thanks for trying anyhow.

I just want to clarify, what do you mean by ‘escape?’ It doesn’t have a dedicated manual entry. Is this the same command as before?

Claims to have worked but no difference was made.

nvidia settings should be installed so you can click on it and if it opens then it should be working

Some characters have special meaning to the shell.

*     zero or more characters 
?     exactly one character
[  ]   exactly one of the characters enclosed in the brackets
\      escape the special meaning of the next character.
'  '   surrounding a word or phrase prevents the shell from interpreting (escapes) the special characters enclosed.

are some of them.
Thus
nvidia* is seen to represent any and all names that start with nvidia, which is why your dnf install command had a problem with nvidia-bug-report.log.gz. Apparently there was a file with that name in the directory where you issued the dnf command.

There are many references that can be used to learn use of the bash shell and linux commands.
[

Linux Command Line Books by William Shotts

](Linux Command Line Books by William Shotts)
is one of those as is
Advanced Bash-Scripting Guide

There are many others found with a quick search for bash tutorials or bash scripting.

Tried that. The one that I would like to use is ‘not compatible’. The server edition of the same software installs, but an error pops up.

1 Like
dnf erase ‘nvidia*’

Worked instantly!


btw,
I have been wanting to read up on Linux terminal info to progress from my current ‘noob’ status. It is good that there are books on such things. Are there any Fedora-specific books you might recommend, or should I just look at general Linux books like the ones you suggested?

To learn using bash and the linux command line those books and many more are available. For fedora specific details the Fedora Docs are the best.

In general, almost everything that works from the command line for linux in any distro is the same on Fedora. The Fedora Docs are specialized for those things that have been changed or are fedora specific. The fedora docs start from the very beginning of fedora and each new release documents the changes and new features.

EDIT:
The fedora docs are system specific. The other books are system agnostic and bash works in all versions of linux when using the bash shell.

Right, I’ll probably get the book you recommended then.