1. To Install a Package usingYUM
# yum install packagename
or
#yum -y install packagename
2. Removing a Package using YUM
# yum remove packagename
or
#yum -y remove packagename
3. Updating a Package using YUM
# yum update packagename
or
# yum -y update packagename
4. To List a Package using YUM
# yum list packagename
5. To Search for a Package using YUM
#yum search packagename
#yum search all "web server"
6. To Get Information of a Package using YUM
# yum info packagename
7. To List all Available Packages using YUM
# yum list
8. To List all Installed Packages using YUM
#yum list installed
9. To check package name from any system file
yum provides function is used to find which package name belong to a specific file , if you want to know which package is responsible for /etc/passwd you can run it.
#yum provides filename
Example: #yum provides /etc/passwd
10. To check Available Updates using Yum
By running check-update you can find how many of installed packages on your system have updates available.
#yum check-update
11. Make Your System up to date using Yum
This will update your system also update your configured repo data
# yum update
# yum update --security
12. For Checking all available Group Packages list
This command will show you all the group list available available in yum
#yum grouplist
13. To Install a Group Packages using yum
#yum groupinstall 'group package name'
14. To Update a Group Packages using yum
To update any existing installed group packages, just run the following command as shown below.
#yum groupupdate 'group package name'
like
# yum groupupdate 'MySql Database'
15. To Remove a Group Packages using yum
This command will remove all packages related to given group.
#you groupremove 'group package name'
16. To Check all Enabled Yum Repositories list
To list all enabled Yum repositories in your system, use following option.
#yum repolist
16. To Check all the Enabled and Disabled Yum Repositories list
The following command will display all enabled and disabled yum repositories on the system.
# yum repolist all
17. To Install a Package from Specific Repository
To install a particular package from a specific enabled or disabled repository, you must use –enablerepo option in your yum command.
# yum --enablerepo=epel install httpd
18. To Check Interactive Yum Shell
Yum utility provides a custom shell where you can execute multiple commands.
# yum shell
19. To Clean Yum Cache
This command will clean all the repo metadata and the temp downloaded packages.
# yum clean all
20. To check History of Yum
To view all the past history of yum command like we use history command.
# yum history
# yum history list all
21. To undo of Yum
To undo from history of yum command we can use below command to revert installation.
# yum history undo "historyID"
like
22. To redo of Yum
To redo a yum install, as before, take note of the transaction ID, and run it. For instance to redo the install with ID 10, run the the following command.
# yum history redo "historyID"
# yum history redo 10
23. To install local RPM from Yum command
# yum localinstall package.rpm
Thanks