Working with YUM command (with examples)
YUM or Yellowdog Updater Modified is front-end tool for managing of rpm packages. Its used to install, remove, update & to gather information about rpm packages through command line interface or by using graphical mode. Major advantage of using YUM is that, it resolves all the dependencies of the rpm packages & installs them along with the package.
Let’s discuss some yum command examples,
(Recommended Read: Some pretty useful YUM tips & tricks)
(Also Read: Rollback an update on RHEL/CentOS – A simple guide )
YUM command examples
- Installing a package yum install httpd
- Removing a package yum remove httpd
- Updating a package yum update httpd
- List all installed packages yum list installed | less
Here “| less” is used so we can browse through all the installed packages.
- List single package yum list httpd
- List all bundled group packages yum grouplist
- Install a group package yum groupinstall ‘Minimal Install’
- Remove a group package yum groupremove ‘NFS fille server’
- Search a single package yum search httpd
- List information for a package yum info httpd
- To find the files belonging to which package yum provides /etc/httpd/conf/httpd.conf
- Show all repolist (enabled & disabled) yum repolist all
- Install a package from a particular repository yum –enablerepo=epel install nginx
- Clean yum cache yum clean all
Default cache file for yum is stored at /var/cache/yum
- Viewing YUM command history yum history
Using YUM is fast & easy way to install rpm packages, as there is no need not worry about manually installing all the dependencies, which in many cases also has their own dependencies and thus you will end up spending a lot of time for just installing a single package.
We now have another new & improved package manager called DNF aka Dandified YUM, which is an improvement over YUM. We will discuss it in our coming tutorial . Also read our tutorial for using rpm commands with examples, give it a look (comes handy in many ways).
Please don’t forget to leave your feedback/queries in the comment box down below.