I recently replaced my NVIDIA graphics card with an AMD card on Debian. Since the switch, the system sometimes freezes visually while audio continues playing. I previously installed the NVIDIA drivers through the package manager and already ran `sudo apt purge 'nvidia-*'`. However, searching my files for "nvidia" still shows various folders and files. Is it safe to remove them manually, and how can I check whether an NVIDIA kernel module is still active?
3 Answers
Don’t manually delete every file or folder whose name contains “nvidia.” Some may belong to other packages, configuration caches, or files that will simply be recreated. First check whether an NVIDIA module is loaded with `lsmod | grep -i nvidia`. You can also inspect installed packages with `dpkg -l | grep -i nvidia`. If the purge removed the packages and `lsmod` returns nothing, NVIDIA is probably not involved in the freezes.
The symptoms sound more like an AMD driver, kernel, firmware, or graphics-stack problem than leftover NVIDIA files. Update the system with `sudo apt update` and `sudo apt full-upgrade`, then check the kernel log after a freeze or reboot with commands such as `journalctl -b -1 -k` and look for graphics-related errors. Also confirm that the AMD device is using the expected driver with `lspci -k`. The exact GPU model, Debian version, kernel version, and relevant log messages would make the problem much easier to diagnose.
A file-manager search is not a reliable way to identify installed drivers. Use the package manager to find remaining NVIDIA packages, for example `apt list --installed 2>/dev/null | grep -i nvidia`. If anything is still installed, remove only the packages that are actually present and then run `sudo apt autoremove`. Avoid deleting files under system directories by hand unless you know which package owns them; `dpkg -S /path/to/file` can identify the owner.

That makes sense. I was assuming every matching filename was part of the old driver installation.