Remove Leftover NVIDIA Repo Files on Fresh 26.2 Installs

If you did a fresh install of GhostBSD 26.2 (MATE or Xfce), you need to make a small manual fix.

What happened

A bug in xconfig left two files behind on new installations: /usr/local/etc/pkg/repos/XDrivers.conf and the /xdrivers directory. Because of this, pkg treats the NVIDIA driver repository as active on every system. The result is that installing many packages (GIMP, DeaDBeeF, MAME, MOC, aMule and others) pulls in nvidia-kmod and xlibre-nvidia-driver as dependencies on Intel and AMD hardware. Some programs then crash or fail to start.

Systems upgraded from 26.1 are not affected.

How to fix it

Everyone on a fresh 26.2 install, with or without an NVIDIA GPU, should open a terminal and run:

sudo rm /usr/local/etc/pkg/repos/XDrivers.conf
sudo rm -rf /xdrivers

If your system does not have an NVIDIA GPU, also check for NVIDIA packages that were pulled in by mistake:

pkg info | grep nvidia

Remove every package it lists, for example:

sudo pkg delete nvidia-kmod xlibre-nvidia-driver

NVIDIA users keep their drivers and only remove the two files.

Then update your system with Update Station (or sudo pkg upgrade) and reboot.

What’s next

The fix is in xconfig (ghostbsd/xconfig#61). GhostBSD 26.3 will be released with this fix and a few others included, so new installs will not need this step.

Thanks to meurglys and antony for reporting it in this forum discussion.

Tags