To tell yum to check only a specific repository for updates, append the yum command like below:
yum --disablerepo="*" --enablerepo="my-repo" update
The –disablerepo=”*” disables all repositories, and then –enablerepo=”my-repo” enabled only my-repo. Note that the repository you enable must already be configured in the system, or this command will not work.
First, you may want to check which repositories are currently active in the system. Confirm that the repository you want to update from is enabled. To get a list of all repositories currently active, run:
yum repolist
The same command line options can be used with yum install and other operations, for example
yum --disablerepo="*" --enablerepo="my-repo" install httpd
This article applies to:

Lightning-fast VPS hosting with enterprise SSD storage, global data centers, and 99.99% uptime. Built for developers, trusted by enterprises.
support@solvps.com
1-888-256-8213
These cookies are essential for the website to function and cannot be switched off.
These cookies enable enhanced functionality and personalization, such as live chat or video.
These cookies help us understand how visitors interact with the website (for example Google Analytics).
These cookies are used to deliver and measure advertising (for example Meta Pixel, LinkedIn Insight, Google Ads).