Group Removal of packages in RHEL Fedora Linux

You need to be very careful while performing this step. With yum groups, you can easily install, update and remove a set of packages. Suppose you want to remove all the Editors from your RHEL machine, you can simply use the option groupremove of yum.

NOTE: You must ensure first that you are aware of the packages in a group. So first ensure that you are fully aware of all the packages that will be removed.

# yum groupinfo "Editors"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process

Group: Editors
 Description: Sometimes called text editors, these are programs that allow you to create and edit text files. This includes Emacs and Vi.
 Default Packages:
   vim-enhanced
 Optional Packages:
   cssed
   emacs
   emacs-auctex
   emacs-bbdb
   emacs-ess
   emacs-muse
   emacs-vm
   geany
   gobby
   jed
   joe
   leafpad
   nedit
   pida
   poedit
   psgml
   scite
   scribes
   scribes-templates
   vim-X11
   xemacs
   xemacs-ess
   xemacs-muse
   xemacs-packages-extra
   xmlcopyeditor
   zile

Now that you are aware of the list of packages, you can proceed with groupremove.

# yum groupremove "Editors"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process
Resolving Dependencies
--> Running transaction check
---> Package emacs.i686 1:23.2-7.fc14 set to be erased
---> Package vim-enhanced.i686 2:7.3.056-1.fc14 set to be erased
---> Package xemacs.i686 0:21.5.29-14.fc14 set to be erased
--> Processing Dependency: xemacs(bin) >= 21.5.29 for package: xemacs-packages-base-20100727-1.fc14.noarch
--> Processing Dependency: xemacs(bin) = 21.5.29-14.fc14 for package: xemacs-common-21.5.29-14.fc14.i686
--> Running transaction check
---> Package xemacs-common.i686 0:21.5.29-14.fc14 set to be erased
---> Package xemacs-packages-base.noarch 0:20100727-1.fc14 set to be erased
--> Finished Dependency Resolution
Remove        5 Package(s)

Installed size: 37 M
Is this ok [y/N]: n

If you press y, you will be able to remove all the packages. But as you see that we pressed n since we don’t wish to remove vim and emacs from our machines

Group Update of packages in RHEL/Fedora Linux

If you have learnt about group installation of packages in RHEL/Fedora Linux, let’s explore on how to update a group of packages. Let’s see if any package in the group “Editors” needs upgradation. For this purpose, we will use the groupupdate option of yum

NOTE: Don’t forget the group name in quotes

# yum groupupdate "Editors"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process
Package 2:vim-enhanced-7.3.056-1.fc14.i686 already installed and latest version
No packages in any requested group available to install or update

As you can see that the group “Editors” needed no upgradation

Let’s see group updation of “Administration Tools”

# yum groupupdate "Administration Tools"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process
Package authconfig-gtk-6.1.11-1.fc14.i686 already installed and latest version
Package system-config-lvm-1.1.15-1.fc14.noarch already installed and latest version
Package system-config-firewall-1.2.27-1.fc14.noarch already installed and latest version
Package system-config-keyboard-1.3.1-2.fc14.i686 already installed and latest version
Package system-config-date-1.9.61-1.fc14.noarch already installed and latest version
Package gnome-packagekit-2.32.0-2.fc14.i686 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package system-config-boot.i686 0:0.4.1-2.fc14 set to be installed
---> Package system-config-language.noarch 0:1.3.5-4.fc14 set to be installed
---> Package system-config-network.noarch 0:1.6.2-1.fc14 set to be installed
--> Processing Dependency: system-config-network-tui = 1.6.2-1.fc14 for package: system-config-network-1.6.2-1.fc14.noarch
---> Package system-config-users.noarch 0:1.2.107-1.fc14 set to be updated
--> Running transaction check
---> Package system-config-network-tui.noarch 0:1.6.2-1.fc14 set to be updated
--> Finished Dependency Resolution
....
Install       3 Package(s)
Upgrade       2 Package(s)

Total download size: 2.1 M
Is this ok [y/N]: 

In this example, you can see a number of packages that will be updated and installed.

How to get more Information on a Group of packages in RHEL/Fedora Linux?

yum groups a set of packages serving a purpose into “Groups”. You can see the available groups in your machine. Once you find the list, you can know more about a group using the groupinfo option of command yum.

This gives you a description of the group and also the available and optional packages.
Let’s see more about the group “Editors”

# yum groupinfo "Editors"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process

Group: Editors
 Description: Sometimes called text editors, these are programs that allow you to create and edit text files. This includes Emacs and Vi.
 Default Packages:
   vim-enhanced
 Optional Packages:
   cssed
   emacs
   emacs-auctex
   emacs-bbdb
   emacs-ess
   emacs-muse
   emacs-vm
   geany
   gobby
   jed
   joe
   leafpad
   nedit
   pida
   poedit
   psgml
   scite
   scribes
   scribes-templates
   vim-X11
   xemacs
   xemacs-ess
   xemacs-muse
   xemacs-packages-extra
   xmlcopyeditor
   zile

As you can see, there’s a description, list of available packages and the optional ones too.

Let’s explore the group “Web Development”

# yum groupinfo "Web Development"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process

Group: Web Development
 Description: These packages are helpful when developing web applications or web pages.
 Optional Packages:
   Django
   TurboGears
   ctemplate
   gallery2
   php-oauth
   php-xmpphp
   python-cherrypy
   rubygem-rails
   velocity

Here you can see the description and the optional packages. Use group info to know more about other available groups in your machine.

Group installation of packages in RHEL/Fedora Linux

With yum, you can easily install a group of packages with a simple command. A collection of packages which deal with a particular purpose is called a group. Various examples include

  1. Administration Tools
  2. Authoring and Publishing
  3. Dial-up Networking Support
  4. Editors
  5. Electronic Lab
  6. Fonts
  7. GNOME Desktop Environment
  8. GNOME Software Development
  9. Games and Entertainment

To check what are the available groups in your system, you can make use of grouplist option of yum.

Now once you have decided a group, you can easily install the group of packages with groupinstall option. Let’s take an example of editors. Let’s install the group ‘Editors”.

NOTE: Don’t forget the put the group name in quotation marks. If you forget to put it, group names with two ore more words are taken as two separate words, which may result in failures.

So, we will use quotation marks for group names, irrespective of whether they are one, two or three words group names

# yum groupinstall "Editors"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process
Package 2:vim-enhanced-7.3.056-1.fc14.i686 already installed and latest version
No packages in any requested group available to install or update

The default package is already installed in the above case. Let’s see some other installation of a group. Try “Sound and Video”

# yum groupinstall "Sound and Video"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process
Package alsa-utils-1.0.23-3.fc14.i686 already installed and latest version
Package 1:totem-nautilus-2.32.0-1.fc14.i686 already installed and latest version
Package pulseaudio-module-bluetooth-0.9.21-7.fc14.i686 already installed and latest version
Package pulseaudio-utils-0.9.21-7.fc14.i686 already installed and latest version
Package pulseaudio-0.9.21-7.fc14.i686 already installed and latest version
Package 1:totem-2.32.0-1.fc14.i686 already installed and latest version
Package 1:totem-mozplugin-2.32.0-1.fc14.i686 already installed and latest version
Package alsa-plugins-pulseaudio-1.0.22-1.fc13.i686 already installed and latest version
Package cdparanoia-10.2-9.fc13.i686 already installed and latest version
Package sound-juicer-2.32.0-2.fc14.i686 already installed and latest version
Package brasero-2.32.0-1.fc14.i686 already installed and latest version
....
Install       1 Package(s)
Upgrade      15 Package(s)

Total download size: 8.7 M
Is this ok [y/N]:

It’s a snippet of the output. So you see groupinstall is capable of installing a set of packages capable of performing a task

How to get the list of available groups of packages in RHEL/Fedora Linux?

yum has a concept called “groups” which makes the package installation a simpler step. Take for example, the group “Editors” has collection of all major editors like vim, emacs. So instead of installing each package like vim,emacs independently, you can easily install a group.

There are additional advantages of groups especially with the language support. If you want to add your native language support, you can easily do with groupinstall option of yum.

But first let’s explore the list of available groups in RHEL/Fedora. For that you must use the option grouplist option of yum

# yum grouplist
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Group Process
Installed Groups:
   Administration Tools
   Arabic Support
   Armenian Support
   Assamese Support
   Authoring and Publishing
   Bengali Support
   Bhutanese Support
   Chinese Support
   Dial-up Networking Support
   Editors
   Electronic Lab
   Ethiopic Support
   Fonts
   GNOME Desktop Environment
   GNOME Software Development
   Games and Entertainment
   Georgian Support
   Graphical Internet
   Graphics
   Gujarati Support
   Hardware Support
   Hebrew Support
   Hindi Support
   Input Methods
   Inuktitut Support
   Japanese Support
   Kannada Support
   Kashmiri Support
   Khmer Support
   Konkani Support
   Korean Support
   Lao Support
   Legacy Fonts
   Mail Server
   Maithili Support
   Malayalam Support
   Marathi Support
   Milkymist
   Myanmar (Burmese) Support
   Network Servers
   Office/Productivity
   Oriya Support
   Printing Support
   Punjabi Support
   Ruby
   Russian Support
   Sanskrit Support
   Server Configuration Tools
   Sindhi Support
   Sinhala Support
   Sound and Video
   System Tools
   Tajik Support
   Tamil Support
   Telugu Support
   Text-based Internet
   Thai Support
   Urdu Support
   Venda Support
   Web Server
   X Window System
Available Groups:
   Afrikaans Support
   Albanian Support
   Amazigh Support
   Asturian Support
   Azerbaijani Support
   Base
   Basque Support
   Belarusian Support
   Books and Guides
   Bosnian Support
   Brazilian Portuguese Support
   Breton Support
   Bulgarian Support
   Catalan Support
   Chichewa Support
   Clustering
   Coptic Support
   Croatian Support
   Czech Support
   DNS Name Server
   Danish Support
   Development Libraries
   Development Tools
   Directory Server
   Dogtag Certificate System
   Dutch Support
   Educational Software
   Engineering and Scientific
   English (UK) Support
   Esperanto Support
   Estonian Support
   FTP Server
   Faroese Support
   Fedora Eclipse
   Fedora Packager
   Fijian Support
   Filipino Support
   Finnish Support
   Font design and packaging
   French Support
   Frisian Support
   Friulian Support
   Gaelic Support
   Galician Support
   German Support
   Greek Support
   Haskell
   Hiligaynon Support
   Hungarian Support
   Icelandic Support
   Indonesian Support
   Interlingua Support
   Irish Support
   Italian Support
   Java
   Java Development
   KDE Software Compilation
   KDE Software Development
   Kashubian Support
   Kazakh Support
   Kinyarwanda Support
   Kurdish Support
   LXDE
   Latin Support
   Latvian Support
   Legacy Network Server
   Legacy Software Development
   Lithuanian Support
   Low Saxon Support
   Luxembourgish Support
   Macedonian Support
   Malagasy Support
   Malay Support
   Maltese Support
   Manx Support
   Maori Support
   MeeGo NetBook UX Environment
   MinGW cross-compiler
   Mongolian Support
   MySQL Database
   Nepali Support
   News Server
   Northern Sotho Support
   Norwegian Support
   OCaml
   Occitan Support
   OpenOffice.org Development
   Perl Development
   Persian Support
   Polish Support
   Portuguese Support
   PostgreSQL Database
   Romanian Support
   Samoan Support
   Sardinian Support
   Serbian Support
   Slovak Support
   Slovenian Support
   Somali Support
   Southern Ndebele Support
   Southern Sotho Support
   Spanish Support
   Sugar Desktop Environment
   Swahili Support
   Swati Support
   Swedish Support
   Tagalog Support
   Tetum Support
   Tibetan Support
   Tonga Support
   Tsonga Support
   Tswana Support
   Turkish Support
   Turkmen Support
   Ukrainian Support
   Upper Sorbian Support
   Uzbek Support
   Vietnamese Support
   Virtualization
   Walloon Support
   Web Development
   Welsh Support
   Window Managers
   Windows File Server
   X Software Development
   XFCE
   XFCE Software Development
   Xhosa Support
   Zulu Support
Done

As you can see, if you are a java developer, you can install java related packages with the group “Java Development”. In the above list, you can see both installed and non-installed groups. Keep this list for reference on group installation of packages

Detailed listing of a directory/file with ls -l

ls is used to see the contents of a file. With the option -l, one can see the file/directory permissions for owner,group and others. This option is also useful to see information like the owner and group owner and size of the file.

let’s take a simple example. Seeing the detailed listing of a /usr/local/share/man/man1


$ ls -l /usr/share/man/man1/* | head -20

-rw-r--r-- 1 root root   1010 2008-08-20 19:05 2vcard.1.gz
-rw-r--r-- 1 root root    592 2010-06-25 18:20 411toppm.1.gz
-rw-r--r-- 1 root root    292 2010-07-21 21:45 a2j_control.1.gz
-rw-r--r-- 1 root root    413 2010-07-21 21:45 a2jmidi_bridge.1.gz
-rw-r--r-- 1 root root    424 2010-07-21 21:45 a2jmidid.1.gz
-rw-r--r-- 1 root root   4656 2010-07-12 17:11 a2p.1.gz
-rw-r--r-- 1 root root   5976 2010-08-16 16:25 a2ping.1.gz
-rw-r--r-- 1 root root   1356 2009-04-29 02:17 a2psj.1.gz
-rw-r--r-- 1 root root    798 2010-03-05 07:47 aalib-config.1.gz
-rw-r--r-- 1 root root   2608 2010-11-19 02:50 ab.1.gz
-rw-r--r-- 1 root root   1024 2010-07-02 16:05 ac3dec.1.gz
-rw-r--r-- 1 root root     20 2009-11-07 04:28 ace.1p.gz
-rw-r--r-- 1 root root  11985 2010-01-04 20:33 ack-grep.1p.gz
-rw-r--r-- 1 root root   1136 2010-02-02 06:29 aclocal-1.11.1.gz
-rw-r--r-- 1 root root   1068 2010-06-20 08:14 acl.php.1.gz
-rw-r--r-- 1 root root   1380 2010-10-22 03:46 aconnect.1.gz
-rw-r--r-- 1 root root    738 2005-10-25 15:32 aconnectgui.1.gz
-rw-r--r-- 1 root root    697 2009-12-25 13:56 acpi_available.1.gz
-rw-r--r-- 1 root root    367 2010-06-23 08:06 acpi_fakekey.1.gz
-rw-r--r-- 1 root root    823 2010-05-15 17:39 acyclic.1.gz

Since the above directory is a big directory, we used head to filter out first 20 lines. This example is going to be used in various tutorials like Vim Visual Block.

Vim: Visual Block Tutorial

Vim has various modes like the normal mode, insert mode and visual mode. In the visual mode, you can perform various actions as you can do with other GUI based text editors and mouse. One of the best features of Visual mode in Vim is the ability to select text for performing various actions like copying, deleting and changing the case (upper case to lower case).

  1. Introduction to Vim Visual Mode
  2. Vim Visual block
  3. Example used for explaining the Visual mode