The Journal Of A Linux Sysadmin

Yum: Group Related Features - Groupremove, Groupinstall

| Comments

This post is a follow up to the very useful articles posted by Cornelius on Yum usage. As you most certainly know by now, I am a debian/apt fan, but even so I had to work on several centos/fedora/rhel systems many times. One of the nicest features of yum I have found, is the ability to work with software groups. This has been very useful for me in several occasions where I had to clean up a wrong installation (removing a bunch of X related applications on a dedicated server for ex.). Removing several packages by hand would have been very time consuming, but so with just one command all the group (let’s say “X Window System”) can be removed, and with the dependencies also. Very cool!

Here are the available group related commands in yum:

  • groupinstall group1 [group2] […]

  • groupupdate group1 [group2] […]

  • grouplist [hidden]

  • groupremove group1 [group2] […]

  • groupinfo group1 […]

The options are self explanatory. For example to remove one group you will just run:

yum groupremove ‘X Software Development’

To get the list of groups you just use the grouplist command (bellow you have the output from a Centos-4.5 system):

yum grouplist
Setting up Group Process
Setting up repositories
update                    100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
centosplus                100% |=========================|  951 B    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
yumgroups.xml             100% |=========================| 558 kB    00:00
yumgroups.xml             100% |=========================| 4.6 kB    00:00
<strong>Installed Groups:</strong>
Compatibility Arch Support
Mail Server
MySQL Database
Server Configuration Tools
Windows File Server
<strong>Available Groups:</strong>
Administration Tools
Authoring and Publishing
Compatibility Arch Development Support
DNS Name Server
Development Tools
Engineering and Scientific
FTP Server
GNOME Desktop Environment
GNOME Software Development
Games and Entertainment
Graphical Internet
KDE (K Desktop Environment)
KDE Software Development
Legacy Network Server
Legacy Software Development
Network Servers
News Server
PostgreSQL Database
Printing Support
Sound and Video
System Tools
Text-based Internet
Web Server
X Software Development
X Window System

ps. personally I would never use the groupinstall feature as I like to keep my systems with a minimum installed packages and so I like to know exactly what I’m installing. Nevertheless, this might be a very cool and useful feature for other peoples.