Yum ‘groupinstall’ – A Quick Introduction


Yum “groupinstall’ is a powerful command that saves your precious time by installing group of packages easily without having to install packages one by one. For example, if you want to install ‘development libraries’ on RHEL/CentOS based systems, you will achieve this task as shown below:

# yum install gcc
# yum install glibc
# yum install make

This seems very time confusing process. Wouldn’t be nice if you did all the above tasks with one command? Here comes ‘yum groupinstall’ command. It will install a group of packages with a single command for a specific task.

How do I find an available grouplist?

You can find the available groups using the grouplist command. It gives you a bird’s-eye view of the software groups available on your machine. Think of it as a library index that shows you the various collections of software packages. 

With this command, you can quickly identify available and installed groups in your system repository.

Enter the following command to find out the list of available groups in your system.

# yum grouplist

The above command will list all the yum groups.


As you see in the above output, there are many yum groups available.

Yum supports the group commands:

# yum grouplist
# yum groupinfo
# yum groupinstall
# yum groupremove
# yum groupupdate

Let’s first see a few ways to use the groupinstall command before discussing what the other commands can do:

Install Development libraries

if you want to install all development libraries with single command, then do:

# yum groupinstall "Development Tools"

The above command will download and install all required development libraries to your system.

Install E-mail Server

Suppose if you want to install email server in your system, the do it with single command:

# yum groupinstall "E-mail server"

The above command will install all the required packages to setup mail server in your system.

Thats it. Enjoy!

Other Useful Yum Group Commands

There’s a lot else you can achieve using the other group commands offered with yum:

#1 yum groupinfo

If you’re wondering what software comprises a certain software group, you can use the yum groupinfo command. 

Running the command will detail the constituents of the specified software group, such as mandatory, default, and optional packages.

#2 yum groupremove

As the name suggests, this command does the opposite of the yum groupinstall command. 

It uninstalls all packages from a specified software group, effectively removing that group’s software collection from your system.

Interestingly, the groupremove command is a newer version of an older command, the “grouperase” command. You might find references to this older command in older scripts and documentation.

If you’re working with legacy scripts or older versions of Yum, this is the command you should use to uninstall software groups from the machine.

#3 yum groupupdate

The yum groupupdate command updates all the packages in a specific software group to their latest versions available in the repositories. 

It ensures that the software within that group is up-to-date.