'yum' is a powerful software utility used to automatically update and install/remove packages on an RPM based Linux system, retrieve package information, and automatically resolve dependencies.
Originally created by Terra Soft, "yup" (Yellow Dog Updater) was improved and is now maintained by Linux@Duke team at Duke University, becoming yum (Yellow Dog Updater, Modified). yum now ships with Red Hat and works with Fedora, Mandrake, and of course Yellow Dog Enterprise Linux and Y-HPC.
Before starting directly with the yum commmand line options, please be informed that dependency check is always done with the yum usage. Also the default usage will prompt for Yes/No to ask you if something is really what you wanted to do. This feature could be overriden by using the -y option, though it is strongly suggested that you do use the default option, so that you double confirm what is happenning and also it is a good way to find out all the dependencies of a package.
Before you can use yum, configure yum. You only have to configure yum once.
Basic yum commands
- yum list -- lists the packages that are not installed but available.
- yum list updates -- lists updates that are available for the installed packages.
- yum list installed -- lists all the installed packages.
- yum install [package name]
yum install php [ENTER]... this installs the latest version of a package or group of packages, satisfying all the dependencies.
- yum update [package name]
yum update php [ENTER]... this updates the php package if an updated release is available for the specified package. If you would like to update every package that is currently installed in your system, run this command without any package name. In either case dependecies are checked and satisfied.
- yum info [package name]
yum info php [ENTER]... this returns a brief introduction of the package your are going to install. You dont have to have this package installed( unlike rpm -qi). If an updated release of the package is available it will display information regarding both.
- yum whatprovides [file name]
yum whatprovides /usr/bin/php... this would return the package that installed the /usr/bin/php file. It differs from rpm -qf the same way as described for the previous one.
- yum remove [package name]
yum remove php... this removes the installed php package ( dependency check surely done).
For more information please visit the official yum webapge.