Yum Update Just One Repo

It is quite common to end up having a number of repositories setup for use with yum and sometimes it pays to be a bit careful when updating your system and not simply updating everything.

Whilst a yum update -y is usually fine on a system that uses a single repo such as amzn-core which will have been tested to ensure everything works fine together you might have installed additional repos in order to get specific versions of a program.

For example php, mysql, ngnix usually don’t have latest versions in the core repos and there could be compatibility issues that you need to check before updating so updating all repos at once might introduce additional risk.

Yum doesnt have a switch option to specify to use just a single target repo but there is an easy solution were by you simply disabled all repos then enable the one you want to target

yum --disablerepo="*" --enablerepo="TargetRepoName" update

This enables you to update just a single repo and have more control.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.