Run “yum update” with a specific repo (CentOS/RHEL Linux)

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:

  • CentOS Linux
  • Fedora Linux
  • RHEL
logo

Lightning-fast VPS hosting with enterprise SSD storage, global data centers, and 99.99% uptime. Built for developers, trusted by enterprises.

Get Help

support@solvps.com

1-888-256-8213

Live Chat Now

© 2025 Hostway Services, Inc. dba SolVPS. All trademarks, service marks, product names, and logos appearing on this website are the property of their respective owners.