How to Uninstall NVIDIA Drivers and Revert to Nouveau on Fedora

Remove NVIDIA drivers and install the Nouveau open-source driver on Fedora using DNF commands.

The scenario

You installed the proprietary NVIDIA driver to get better gaming performance or CUDA support. A few weeks later, a kernel update breaks the display server. Your screen flickers on boot, Wayland refuses to start, or you simply want to return to a stable, fully open-source stack. The proprietary driver is tangled with kernel modules, Xorg configuration files, and RPM Fusion repositories. Removing it cleanly requires more than deleting a few packages. You need to strip the kernel modules, restore the open-source stack, and ensure the display manager picks up the change on the next boot.

What is actually happening

Fedora ships with Nouveau, the open-source reverse-engineered driver for NVIDIA hardware. It lives in the mainline kernel tree and updates automatically with every kernel release. When you install the proprietary driver, you replace Nouveau with nvidia.ko and a suite of userspace libraries. The akmod-nvidia package compiles a kernel module specifically for your running kernel. That module loads early in the boot process and claims exclusive access to the GPU. If you simply uninstall the userspace packages without touching the kernel module, the system will try to load a missing nvidia.ko file on the next boot. The display server will fail to start, and you will be dropped to a text console.

Reverting to Nouveau means doing the opposite. You remove the proprietary packages, trigger a kernel module rebuild for the open-source driver, and let the system fall back to the default graphics stack. The process is safe as long as you let dnf handle the dependencies and you reboot before testing. Think of the kernel module system like a locked door. The proprietary driver changes the lock and throws away the old key. You need to reinstall the original lock, cut a new key, and hand it to the boot process before you can enter the desktop again.

Run journalctl -xe first. Read the actual error before guessing.

The removal procedure

Open a terminal and run the removal command. This strips the proprietary driver, the CUDA toolkit, and the Xorg driver. The package manager will also remove any packages that depend exclusively on the NVIDIA stack.

sudo dnf remove akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda \
  xorg-x11-drv-nvidia-power libglvnd-opengl
# WHY: akmod-nvidia handles kernel module compilation. Removing it stops the proprietary driver from rebuilding on kernel updates.
# WHY: xorg-x11-drv-nvidia provides the Xorg display driver. Removing it clears the way for the open-source Xorg driver.
# WHY: libglvnd-opengl redirects OpenGL calls to the NVIDIA library. Removing it restores the default Mesa/Vulkan path.
# WHY: The backslash continues the command across lines for readability. dnf treats it as a single transaction.

Fedora's package manager will prompt you to confirm the removal. Type y and press Enter. The transaction will take a minute to resolve dependencies. Once it finishes, install the open-source equivalents. These packages are usually already present on a default Fedora install, but reinstalling them ensures the configuration files and library symlinks are restored to their factory state.

sudo dnf reinstall xorg-x11-drv-nouveau mesa-libGL mesa-dri-drivers
# WHY: reinstall forces dnf to restore any missing or corrupted files without changing package versions.
# WHY: xorg-x11-drv-nouveau provides the Xorg driver for open-source NVIDIA hardware.
# WHY: mesa-libGL and mesa-dri-drivers restore the standard OpenGL and Vulkan software stack.

Clean up any leftover configuration files that might force the display server to look for NVIDIA hardware. Fedora stores user configuration in /etc/ and ships package defaults in /usr/lib/. Always edit or remove files in /etc/. Never touch /usr/lib/. The proprietary installer sometimes drops a blacklist file to prevent the open-source driver from loading. Delete it if it exists.

sudo rm -f /etc/modprobe.d/blacklist-nouveau.conf
sudo rm -f /etc/X11/xorg.conf.d/20-nvidia.conf
# WHY: Removing blacklist files ensures the kernel loads nouveau.ko during the next boot.
# WHY: Deleting the Xorg configuration file stops the display manager from forcing NVIDIA-specific screen layouts.
# WHY: /etc/ overrides survive package removal. /usr/lib/ files are managed by rpm and will not cause conflicts.

Reboot the system immediately. Do not try to test the graphics stack while the old kernel modules are still loaded in memory. The display server will fail to switch drivers until a fresh boot cycle occurs.

Snapshot the system before the upgrade. Future-you will thank you.

Verify the switch

After the system boots, open a terminal and check which kernel module is active. The lsmod command lists loaded modules. Filter the output for nouveau to confirm the open-source driver is running.

lsmod | grep nouveau
# WHY: lsmod reads /proc/modules to show currently loaded kernel drivers.
# WHY: grep filters the output to only show lines containing nouveau.
# WHY: A successful output shows nouveau, nouveau_drm, and nouveau_modeset with non-zero usage counts.

Check the display server logs to ensure Xorg or Wayland started without errors. The journalctl command is the standard tool for reading systemd logs. Use the -xe flags to add explanatory text and jump to the end of the journal. Most sysadmins type journalctl -xeu <unit> muscle-memory style because it combines filtering, explanation, and pagination in one step.

journalctl -xeu gdm.service | tail -20
# WHY: -x adds explanatory text to error codes. -e jumps to the end of the log. -u filters for the GDM unit.
# WHY: tail -20 limits the output to the most recent lines. This avoids scrolling through hundreds of boot messages.
# WHY: Look for lines containing "loaded nouveau" or "modesetting driver initialized".

Run a quick graphics check to confirm OpenGL and Vulkan are routing through Mesa instead of NVIDIA. The glxinfo command reports the active renderer. Install mesa-demos first if the command is missing.

sudo dnf install mesa-demos
glxinfo | grep "OpenGL renderer"
# WHY: mesa-demos provides glxinfo and other diagnostic utilities.
# WHY: glxinfo queries the active OpenGL implementation.
# WHY: The output should show "NVIDIA GeForce" replaced by "Nouveau" or "llvmpipe" depending on your hardware generation.

Reboot before you debug. Half the time the symptom is gone.

Common pitfalls and error messages

The most common issue is a leftover kernel module cache. If you see the following error in your boot logs, the system is still trying to load the proprietary driver. This happens when the akmod package was removed but the compiled module file remained in /lib/modules/.

modprobe: FATAL: Module nvidia not found in directory /lib/modules/6.8.9-200.fc40.x86_64

The conflict is intentional. The initramfs image was built with the proprietary driver paths. Run the module cleanup command to purge stale files and rebuild the boot environment.

sudo akmods --force
sudo dracut --force
# WHY: akmods --force rebuilds all open-source kernel modules for the current kernel.
# WHY: dracut --force regenerates the initramfs image. This ensures the boot environment includes the new module paths.
# WHY: Both commands must run after package removal. The initramfs caches module locations at build time.

Another frequent problem involves Secure Boot. Fedora signs open-source kernel modules with a default key. If you previously enrolled a custom MOK key for the proprietary driver, the system might refuse to load Nouveau until you update the Secure Boot configuration. Check the boot logs for signature verification failed or required key not available. If Secure Boot is causing issues, disable it in the UEFI firmware settings or re-enroll the default Fedora key.

Wayland compatibility can also cause confusion. Nouveau supports Wayland on most modern NVIDIA GPUs, but older architectures like Kepler or Maxwell may fall back to X11 automatically. The display manager will log a failed to start wayland session message if the hardware lacks the required video decoding blocks. This is normal behavior. The system will switch to X11 without breaking your desktop environment.

Configuration drift is a silent killer. Manual edits to /etc/X11/xorg.conf rarely survive a clean driver swap. If your display resolution is wrong after the switch, delete the custom Xorg configuration and let the display manager auto-detect the monitor. Trust the package manager. Manual file edits drift, snapshots stay.

Run journalctl first. Read the actual error before guessing.

When to use Nouveau versus proprietary drivers

Use Nouveau when you want a stable system that survives kernel updates without manual intervention. Use Nouveau when you run a desktop workflow that prioritizes reliability over maximum gaming frame rates. Use the proprietary NVIDIA driver when you need CUDA compute support for machine learning or video encoding. Use the proprietary driver when you play modern AAA titles that require Vulkan ray tracing or DLSS. Stay on the open-source stack if you only deviate from the defaults occasionally. Revert to Nouveau if the proprietary driver breaks your display server after a routine dnf upgrade --refresh.

If the boot menu is gone, GRUB rescue is your friend, not your enemy.

Where to go next