Join us on our own very special Reddit on /r/Linuxers.
purging drivers
sr_ls_boy 18 Nov
I've got a new RX 6700 card coming my way. I'll finally after about three long years yank my old gtx 970(w 4g) card out. I need to purge my proprietary drivers out and install mesa. I forgot how to do that with Ubuntu. Any advice?
This topic has an answer marked - jump to answer.
CatKiller 18 Nov
 sudo apt-get purge nvidia* libnvidia*
sr_ls_boy 18 Nov
Wouldn't that leave me with no user space video/opengl drivers? After purging immediately reinstall mesa?
CatKiller 19 Nov
You'll already have Mesa. You don't need to reinstall it. Depending on how new your Mesa is, you might want a newer one from Kisak's PPA.
tuxintuxedo 19 Nov
Even if you installed the Nvidia drivers, Mesa is still present on your system, it was not removed. It is just not used.
Shmerl 21 Nov
I think Nvidia binary drivers might do something messy with modprobe configs too. You can check in /etc/modules, /etc/modprobe.d /etc/modules-load.d and etc. Make sure nothing lingering is set there.

Check also your grub boot line. Nvidia installer can modify that too.

If you are using Xorg, you'd also need to remove config file generated by Nvidia for it.

Last edited by Shmerl on 21 November 2022 at 1:49 am UTC
Shmerl 21 Nov
Quoting: sr_ls_boyWouldn't that leave me with no user space video/opengl drivers? After purging immediately reinstall mesa?

You'd have Mesa, but you might be missing AMD firmware which is necessary for GPU to work. You can install latest one manually or look for a package for it. In Debian / Ubuntu it's firmware-amd-graphics but it's usually pretty outdated and upstream versions are preferable.

To update it manually on Debian based distros, you can do something like this:

#!/bin/bash

base_dir="$HOME/archive"
firmware_dir="linux-firmware"
firmware_branch=${firmware_branch:-"main"}

mkdir -p "$base_dir"
cd "$base_dir"

git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git "$firmware_dir"
cd "$firmware_dir"
git checkout "$firmware_branch"
git pull --rebase --prune

sudo cp -v amdgpu/*.bin /usr/lib/firmware/amdgpu/
sudo chown root:root /usr/lib/firmware/amdgpu/*.bin
sudo update-initramfs -u -k all


Last edited by Shmerl on 21 November 2022 at 1:52 am UTC
sr_ls_boy 23 Nov
Thank you for the help,everyone. The command worked.

Shmerl, I'll look into it. But, the kernel messages
are not reporting any missing firmware
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone with no article paywalls. We also don't have tons of adverts, there's also no tracking and we respect your privacy. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register

Or login with...
Sign in with Steam Sign in with Twitter Sign in with Google
Social logins require cookies to stay logged in.