yellowdog update modifier

yum install <package1> <package2>

[root@localhost ~]# yum install httpd



Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package httpd.x86_64 0:2.2.15-26.el6.centos will be updated

---> Package httpd.x86_64 0:2.2.15-29.el6.centos will be an update

--> Processing Dependency: httpd-tools = 2.2.15-29.el6.centos for package: httpd-2.2.15-29.el6.centos.x86_64

--> Running transaction check

---> Package httpd-tools.x86_64 0:2.2.15-26.el6.centos will be updated

---> Package httpd-tools.x86_64 0:2.2.15-29.el6.centos will be an update

--> Finished Dependency Resolution

yum update <package1> <package2>

[root@localhost ~]# yum update httpd



Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

Setting up Update Process

yum upgrade <package1> <package2>

[root@localhost ~]# yum upgrade httpd



Loaded plugins: fastestmirror,refresh-packagekit, security

Loading mirror speeds from cached hostfile

Setting up Upgrade Process

yum remove <package1> <package2>

[root@localhost ~]# yum remove httpd



Loaded plugins: fastestmirror,refresh-packagekit, security

Setting up Remove Process

Resolving Dependencies

--> Running transaction check

---> Package httpd.x86_64 0:2.2.15-29.el6.centos will be erased

--> Processing Dependency: httpd-mmn = 20051115 for package: mod_perl-2.0.4-10.el6.x86_64

--> Processing Dependency: httpd >= 2.2.0 for package: gnome-user-share-2.28.2-3.el6.x86_64

--> Running transaction check

---> Package gnome-user-share.x86_64 0:2.28.2-3.el6 will be erased

---> Package mod_perl.x86_64 0:2.0.4-10.el6 will be erased

--> Finished Dependency Resolution

yum list <package1> <package2>

yum list <option>

[root@localhost ~]# yum list httpd



Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

Installed Packages

httpd.x86_64 2.2.15-29.el6.centos @base

yum info <package1> <package2>

yum info <option>

[root@localhost ~]# yum info httpd



Loaded plugins: fastestmirror, refresh-packagekit, security



Loading mirror speeds from cached hostfile

Installed Packages

Name : httpd

Arch : x86_64

Version : 2.2.15

Release : 29.el6.centos

Size : 2.9 M

Repo : installed

From repo : base

Summary : Apache HTTP Server

URL : http://httpd.apache.org/

License : ASL 2.0

Description : The Apache HTTP Server is a powerful, efficient, and extensible web server.

yum search <package1> <package2>

yum search all

yum clean <option>

For option all,



[root@localhost ~]# yum clean all



Loaded plugins: fastestmirror, refresh-packagekit, security

Cleaning repos: Security-Updates base epel extras spacewalk-client updates

Cleaning up Everything

Cleaning up list of fastest mirrors

You have new mail in /var/spool/mail/root



[root@localhost ~]# yum repolist



Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

repo id repo name status

Security-Updates security-updates 1,154

base base 7,965

epel epel 14,597

extras extras 14

spacewalk-client spacewalk-client 21

updates updates 1,871

repolist: 25,622

yum grouplist

yum groupinstall 'groupname'

yum groupremove 'groupname'

yum groupinfo 'groupname'

yum groupupdate 'groupname'

yum deplist





[root@localhost ~]# yum deplist httpd

yum is an interactive, rpm based,package manager. It can automatically perform system updates, including dependency analysis and obsolete processing based on "repository" metadata. It can also perform installation of new packages, removal of old packages and perform queries on the installed and/or available packages among many other commands/services. yum is similar to other high level package managers like apt-get and smart.yum stands for. You can say,its a better version of rpm because it is intelligent enough to take up the required dependencies for any package being installed.Here are some of the examples that will help you gain more about the usage of yum.1.install is used to install the latest version of a package or group of packages while ensuring that all dependencies are satisfied.2.If run without any packages,update will update every currently installed package.If one or more packages or package globs are specified, Yum will only update the listed packages.While updating packages,yum will ensure that all dependencies are satisfied.3.upgrade is same as the update command with the --obsoletes flag set which means it forces the removal of obsolete packages.The removal of obsolete packages can be risky, as it may remove packages that you use.4.remove is used to remove the specified packages from the system as well as remove any packages which depend on the package being removed.remove operates on groups,files,provides and filelists just like the "install" command.Note: "yum" is included in the protected_packages configuration,by default.So you can't accidentally remove yum itself.5.list is used to list various information about packages. There are numerous options that can be used with list like available,updates,installed,extras,obsoletes,recent,all.You need not necessarily mention the name of the package/packages. It will do it for all packages if not specified.6.info is used to list a description and summary information about available packages. It takes the same arguments as that of list.7.This is used to find packages when you know something about the package but aren't sure of it's name. By default search will try searching just package names and summaries, but if that "fails" it will then try descriptions and url.Yum search orders the results so that those packages matching more terms will appear first.You can force searching everything by specifying "all" as the first argument.Try both the above commands with same keyword and see the difference.8.clean is used to clean up various things which accumulate in the yum cache directory over time. There are various options that can be used with clean like packages,headers,expire-cache,metadata,dbcache,plugins,rpmdb, all. Amont all these, clean all cleans everything. To know more about other options, please refer the man page for yum.Note: clean requires an option: headers, packages, metadata, dbcache, plugins, expire-cache, rpmdb, all9.The default is to list all enabled repositories.If you pass -v,for verbose mode, some additional information is listed.If the first argument is 'enabled', 'disabled' or 'all' then the command will list those types of repos.10.A group is a combination of several related packages. This saves the time of installing several packages one by one, if the packages belong to the same function.There are several options that can be applied to packages in the group. I have explained some of them below.: It is used to list the available groups from all yum repos.: It is used to install all of the individual packages in a group, of the specified types. This works as if you'd taken each of those package names and put them on the command line for a "yum install" command.: It is used to remove all of the packages in a group, unlike "groupinstall" this will remove everything regardless of group_package_types.: It is used to give the description and package list of a group.: It is used to upgrade the existing group of packages.11.Produces a list of all dependencies and what packages provide those dependencies for the given packages.That's not it. These are just few examples of the usage of yum. There are a lot more things you can do with yum. Please refer to the man page of yum for more options.