Use Yum command Linux to install, update and remove RPM’s. Yum uses repositories, resolves dependencies and installs packages. Yum groups all application in order of their application. Yum can also be used to manage these groups.
The configuration file of Yum resides in etc folder – /etc/yum.conf.
Install Package using YUM
To install a package using yum we will use command
yum install package
This command will connect to repository, look for dependency and install package with dependencies, if any. This command will ask you to confirm by pressing y, before proceeding with installation. To install without confirmation use command as
yum –y install package
Update a Package using YUM
To update a package with yum following command is used
yum update package
The sequence for this command is also similar to install command. In this command also you will be prompted for confirmation by pressing y. Again you can add –y to proceed with confirmation.
Remove a Package using YUM
Third basic utility of YUM is to remove package. For this we will use command
yum remove package
This command will remove package along with its dependencies. This command also asks for confirmation. Here also we can use –y to skip confirming.
List a Package using YUM
Yum list command will list Packages installed along with their versions and details of available packages.
The above command list all packages installed in your system. To list details of a specific package use command
yum list package
Search for Package using Yum
To search for a package using yum, use command along with package name or keyword for package
yum search package
Get detailed information for a Package using Yum
To get information for a package using use command
yum info package
Group Install Packages using YUM
As mentioned earlier YUM groups all application in order of their application. To install a group of package using yum we will use command
yum groupinstall groupname
This command work similar to yum install only difference it wortks for group all together and not for a single application.
Update a Group of Packages using YUM
To update a group of package using yum use command
yum groupupdate groupname
This command will update all Packages installed for the group.
Remove a group of Packages using YUM
To remove Packages installed for a particular group using yum, type in command
yum grouperase groupname
List Groups using YUM
The command to list all groups is
This will list all groups available to you.
Clean YUM cache using yum
Yum downloads and keeps application in folder /var/cache/yum/. You will need to clean this space to keep your disk usage under check. To clean yum cache use command
yum clean all
These are few basic commands usages of yum. You can use yum manual page by using command
for more information.