Basic yum commands and its usages

The Yellowdog Updater Modified (YUM) is an rpm package management opensource tool which is available for Redhat Linux and other Linux flavors.In earlier days, its very difficult to install packages in Linux systems since it will ask for many dependencies.After yum introduction,its become very simple and yum has algorithm to select all the dependencies automatically once you configured the yum repository.

This article explains the basic yum commands and its usages. For a complete list see the yum man page.

yum list
  List all packages in all the repositories and all the packages installed on your system.

yum list available
  Lists all the packages available to be installed in any enabled repository on your system. 

yum list installed
  Lists all the packages installed on the system. 

yum list extras
  Lists any installed package which no longer appears in any of your enabled repositories.

yum list obsoletes
   Lists any obsoleting relationships between any available package and any installed package. 

yum list updates
  Lists any package in an enabled repository which is an update for any installed package. 

yum list recent
  Lists any package added to any enabled repository in the last seven(7) days. 

yum list pkgspec
  This command allows you to refine your listing for particular packages. 

yum check-update
  This is like yum list updates but returns an exit code of 100 if there are updates available.

yum install
  This allows to install package.

yum info
  This displays more information about any package installed or available.

yum search
  This allows you to search for information from the various metadata available about packages.

yum provides/yum whatprovides
  This command searches for which packages provide the requested dependency of file. This also takes wildcards for files.

yum makecache
  Is used to download and make usable all the metadata for the currently enabled yum repos.

yum clean
  The yum clean command allows you to clean up these files.

Leave a Reply

Your email address will not be published. Required fields are marked *