Quickest, most efficient method to uninstall NVIDIA drivers including CUDA


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


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

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


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.


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:


and for CUDA, RPM Fusion notes these steps here:


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.
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!

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.

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.

1 Like

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

This worked for me!

My apologies, it seems that there is some dislike about replying to older threads on this forum but as long as people continue to come to the thread for information (like I did) it seems important to me that any user aware of new information should try to update the thread with that information as to not have users like myself following commands that are not optimal.

I have seen multiple reddit comments that seem to use the dnf remove *nvidia*(I saw one that used dnf erase *nvidia*) which they might have gotten from this forum. According to what I understood from Nvidia drivers with secure boot no longer working - #2 by computersavvy , it seems that dnf remove *nvidia* and I guess also dnf erase *nvidia* is not recommended.