yum
Yellowdog Updater Modified
yum
yum info package
yum install package
yum reinstall package
yum remove package
yum erase package
yum update
yum update package
yum update --security
yum updateinfo security
yum upgrade
yum check-update
yum downgrade package
Shows package details
Install
Reinstall
Remove
Remove
Updates all packages on your system
Update
Apply security related package updates
Get info on available security updates
Updates all packages taking obsoletes into account
Query repositories for available package updates
yum list available
yum list installed
yum list all
yum list kernel
List all available packages
List all installed packages
List installed and available packages
List installed and available kernel packages
yum provides mycommand
yum whatprovides mycommand
yum search term
Find packages that provide mycommand
Find packages with term in name or description
yum history
yum history info x
yum history undo x
yum history redo x
yum history rollback x
yum history new
List all yum install. update and erase actions
Additional information, where x is id or package name
Undo action, where x is id
Redo action, where x is id
Rollback all actions that occurred after x, where x is id
Create new history file (erase existing history)
yum clean all
Clean out all packages and meta data from cache
yum help
repoquery
repoquery -l package
repoquery --installed -l package
Repositories
List the Repositories configured for use by yum using...
yum repolist
yum repolist -v enabled
yum repolist -v enabled | grep Repo-baseurl | cut -d\ -f 3
grep 'baseurl=' /etc/yum.repos.d/* | cut -d= -f2
yum --disablerepo=Adoptium
Temporarily disable the Adoptium repo
yum-config-manager --disable Adoptium
yum-config-manager --save --setopt=Adoptium.skip_if_unavailable=true
This will make yum much slower as most commands will need to try and fail (if repo down) each time.Permanently disable the Adoptium repo
Skip Adoptium repo if it's not available
subscription-manager repos --disable=Adoptium
Permanently disable the Adoptium repo
Troubleshooting
If during a yum install you get errors like this...
Could not retrieve mirrorlist https://mirrors.iuscommunity.org/mirrorlist?repo=ius-centos7-testing&arch=x86_64&protocol=http error was14: curl#6 - "Could not resolve host: mirrors.iuscommunity.org; Unknown error"Then you can temporarily exclude the broken repositories...
You can include multiple --disablerepo arguments if you need to skip multiple repositories.yum --disablerepo=ius-testing install git-core
If, when starting a yum install, you see something like this...
Another app is currently holding the yum lock; waiting for it to exit... The other application is: PackageKit Memory : 410 M RSS (755 MB VSZ) Started: Tue Nov 24 17:16:21 2020 - 00:13 ago State : Running, pid: 9441This normally means that an automatic update/check is in progress.
https://packages.adoptium.net/artifactory/rpm/amazonlinux/2/x86_64/repodata/repomd.xml: [Errno 12] Timeout on https://packages.adoptium.net/artifactory/rpm/amazonlinux/2/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 5001 milliseconds')
Examples
yum history
yum history
yum history info 48
yum history info percona-server-server
Bibliography
https://ius.io/ - IUS is a yum repository that provides newer versions of select software for RHEL and CentOS.
yum historyhttps://www.tecmint.com/view-yum-history-to-find-packages-info/
yum-utilshttps://www.tecmint.com/linux-yum-package-management-with-yum-utils/
yum on AWS EC2https://repost.aws/knowledge-center/ec2-al1-al2-update-yum-without-internet