I'd like to know the equivalent of the

dnf remove *nvidia*

with the apt package manager.

1 Answer 1


That would be:

sudo apt-get remove '.*nvidia.*'

This will remove all packages that contain the string nvidia in their names.

If you want to remove the configuration files too, use purge:

sudo apt-get purge '.*nvidia.*'

Note that, for this kind of operation, you should do a --dry-run first:

sudo apt-get --dry-run remove '.*nvidia.*'
  • thanks i didn't knew the '--dry-run' option. Thumbs up
    – dufte
    May 17, 2016 at 7:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .