How to list packages in a yum group? [SOLVED]


Omer Cakmak

Linux

If you are a Linux user, you may often find yourself installing and managing software packages using YUM, the default package manager for many Linux distributions. One useful feature of YUM is the ability to group packages together based on their functionality, which can make it easier to manage and install multiple packages at once.

However, sometimes you may want to know which specific packages are included in a YUM group. This is where the command "yum groupinfo" comes in handy. By using this command, you can quickly and easily list all the packages in a particular YUM group.

To use this command, you need to first identify the name of the YUM group you want to inspect. Once you have the name, simply run "yum groupinfo group_name" to see a list of all the packages in that group.

Being able to list packages in a YUM group can be helpful for a variety of reasons, such as ensuring that all necessary packages are installed for a specific task, or identifying potential conflicts or dependencies between packages.

 

List available groups

yum grouplist is a command in the yum package manager that allows the user to view the available package groups, installed package groups, or packages in a particular group.

yum grouplist [options] [group name]

The yum grouplist command without any options will display a list of all available and installed package groups.

Supported options:

  • -h, --help: Displays the help message and exits.
  • --all: Displays all available and installed package groups.
  • --available: Displays all available package groups.
  • --installed: Displays all installed package groups.
  • --group-info <group name>: Displays detailed information about a particular group.
  • --id <group ID>: Displays the packages in a particular group by ID.

This command displays a list of all available package groups.

$ yum grouplist --available

This command displays a list of all installed package groups.

$ yum grouplist --installed

This command displays detailed information about the "Development tools" package group.

$ yum grouplist --group-info "Development tools"

 

List packages in a group

To list packages in a group using yum, you can use the yum groupinfo command. This command displays information about a specific package group, including the list of packages that are included in the group.

yum groupinfo <group name>

Example:

$ yum groupinfo "Development Tools"

The yum groupinfo command displays detailed information about a specific package group, including the list of packages that are included in the group.

For example, running the command yum groupinfo "Development Tools" will display information about the "Development Tools" package group, including a list of packages that are included in the group.

Here is an example output of the yum groupinfo command:

Group: Development Tools
 Description: These tools include core development tools such as automake, gcc, perl, python and debuggers.
 Mandatory Packages:
   autoconf
   automake
   bison
   flex
   gcc
   gcc-c++
   gdb
   glibc-devel
   libtool
   make
   patch
   pkgconfig
   redhat-rpm-config
   rpm-build
   subversion
 Optional Packages:
   ccache
   valgrind
   valgrind-devel
...

From the output, you can see a list of mandatory and optional packages included in the "Development Tools" package group. You can then use the yum install command to install the package group or individual packages that you need.

 

Using --setopt with yum groupinstall

The --setopt option is used with yum commands to set specific options for the package installation process. With this option, you can specify various configuration options to customize the installation process, such as setting the package types to install or disabling specific plugins. The --setopt option is followed by the name of the option and the value that you want to set. Using --setopt allows you to fine-tune the installation process to your specific requirements, providing additional flexibility and customization when installing packages or groups of packages with yum.

 

Skip packages that have unresolved dependencies

Syntax:

yum groupinstall --skip-broken <group name>

Example:

$ yum groupinstall --skip-broken "Development Tools"

 

Disable a specific plugin that is enabled by default

Syntax:

yum groupinstall --disableplugin=plugin_name <group name>

Example:

$ yum groupinstall --disableplugin=fastestmirror "Development Tools"

 

Skip GPG signature checks for packages

Syntax:

yum groupinstall --nogpgcheck <group name>

Example:

$ yum groupinstall --nogpgcheck "Development Tools"

 

Exclude a specific package from installation

Syntax:

yum groupinstall --exclude=package_name <group name>

Example:

$ yum groupinstall --exclude=libgcc "Development Tools"

 

Skip optional packages from installation

Syntax:

yum groupinstall --setopt=group_package_types=mandatory <group name>

Example:

$ yum groupinstall --setopt=group_package_types=mandatory "Development Tools"

 

Summary

With Yum, you can manage software installation, removal, and updates from repositories.

To list the packages in a Yum group, you can use the yum groupinfo command followed by the name of the group you want to inspect. This command will display detailed information about the group, including the package names, descriptions, and other metadata.

First, open a terminal window on your Linux machine. Then, use the yum grouplist command to list the available Yum groups. Choose the group you want to inspect and use the yum groupinfo command to display information about it.

The output will include a list of packages in the group along with their descriptions and other metadata. The packages will be categorized into mandatory, default, and optional packages.

 

References

unix.stackexchange.com - Listing the packages in a package group on CentOS 7
man7.org - yum-list-data - Linux manual page
stackoverflow.com - Listing yum group
stackoverflow.com - List all packages in yum group

 

Views: 105

Omer Cakmak

He is highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on OpenStack, KVM, Proxmox, and VMware. You can connect with him on LinkedIn or check his projects on GitHub page.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to admin@golinuxcloud.com

Thank You for your support!!

Leave a Comment

GoLinuxCloud Logo


We try to offer easy-to-follow guides and tips on various topics such as Linux, Cloud Computing, Programming Languages, Ethical Hacking and much more.

Programming Languages

JavaScript

Python

Golang

Node.js

Java

Laravel