How to uninstall all packages from the output of rpm -qa | grep nvidia

rpm -qa | grep nvidia produces a list of nvidia packages installed.
How can I uninstall all of these from the output of the above command?
How can I pipe that?

Look at this thread: Erase multiple packages using rpm or yum

for my taste: not a very nice solution. sure it works, but -AFAIK- the solution leave left overs on the box.

so I would suggest this:

sudo dnf remove $(rpm -qa | grep nvidia)

why ?

  • it also removes all packages which are unneeded after nvidia packages are removed, e.g. what nvidia pulled in during install
  • it asks before remove

see:
man dnf
topic “remove”

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.