[CentOS] How to query which yum package groups a particular package is member of

Wed Jan 27 20:22:45 UTC 2021
Kenneth Porter <shiva at sewingwitch.com>

--On Wednesday, January 27, 2021 8:07 PM +0000 J Martin Rushton via CentOS 
<centos at centos.org> wrote:

> Here's how to find the package for a particular file:

That one's easy and I use this all the time:

rpm -qf full-file-name

I'm looking for how to get the yum group for a package. (I'm guessing a 
package might even be in more than one group?) That would help explain how 
the dnsmasq package got installed on my system. (It was never enabled by 
systemd and isn't required by any other package. So I went ahead and erased 
it to free the space and reduce my attack surface.)