Some very useful Fedora 19 yum commands for querying the package database and installing software.

Posted: August 3, 2013. At: 10:46 PM. This was 4 years ago. Post ID: 6077

This is how you query the package database to see if a package is installed or not.

root@neo homer# yum list installed | grep xterm
xterm.x86_64                         293-1.fc19                        @anaconda

This is a more verbose way of doing this.

root@neo homer# yum list installed xterm       
Loaded plugins: fastestmirror, langpacks, refresh-packagekit
Loading mirror speeds from cached hostfile
 * rpmfusion-free: ucmirror.canterbury.ac.nz
 * rpmfusion-free-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-source: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-source: ucmirror.canterbury.ac.nz
Installed Packages
xterm.x86_64                                                                             293-1.fc19                                                                              @anaconda

Use the yum list updates command to list any pending updates for your system.

If there are any updates that need installation, type yum update to install them.

Use the yum list command to list packages by name.

root@neo homer# yum list audacious
Loaded plugins: fastestmirror, langpacks, refresh-packagekit
Loading mirror speeds from cached hostfile
 * rpmfusion-free: ucmirror.canterbury.ac.nz
 * rpmfusion-free-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-source: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-source: ucmirror.canterbury.ac.nz
Installed Packages
audacious.x86_64                                                                            3.4-1.fc19                                                                            @updates

Type yum install [packagename] to install a package.

Type yum remove [packagename] to uninstall a package.

The yum grouplist command will list all available package groups.

root@neo homer# yum grouplist
Loaded plugins: fastestmirror, langpacks, refresh-packagekit
There is no installed groups file.
Loading mirror speeds from cached hostfile
 * rpmfusion-free: ucmirror.canterbury.ac.nz
 * rpmfusion-free-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-source: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-source: ucmirror.canterbury.ac.nz
Available Groups:
   Fonts
   GNOME Desktop Environment
   Games and Entertainment
   Graphical Internet
   Hardware Support
   KDE (K Desktop Environment)
   Sound and Video
   System Tools
Done

Type this command to install all packages in the development group.

yum groupinstall "Development Tools"

And this is how to remove all packages in the development group.

yum groupremove "Development Tools"

And this command will list all software installed via extra repositories. This could be quite a long list.

yum list extras

Finally; this command: yum whatprovides will tell you which package a certain file belongs to.

root@neo homer# yum whatprovides /usr/bin/xterm 
Loaded plugins: fastestmirror, langpacks, refresh-packagekit
Loading mirror speeds from cached hostfile
 * rpmfusion-free: ucmirror.canterbury.ac.nz
 * rpmfusion-free-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-source: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-free-updates-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-source: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-debuginfo: ucmirror.canterbury.ac.nz
 * rpmfusion-nonfree-updates-source: ucmirror.canterbury.ac.nz
xterm-293-1.fc19.x86_64 : Terminal emulator for the X Window System
Repo        : @anaconda
Matched from:
Filename    : /usr/bin/xterm
1 responses to “Some very useful Fedora 19 yum commands for querying the package database and installing software.

This is a great resource. Just went to fedora and switching over the command line has been a boon. Thank you.
Dr. Nick Prieve

Leave a Reply