Question
How to disable or enable a yum repository for a single yum transaction?
Answer
To enable a repository for a single yum or dnf transaction, run the following command in SSH as root:
# yum --enablerepo="$REPO" update $PACKAGE
To disable a repository for a single yum or dnf transaction, run the following command in SSH as root:
# yum --disablerepo="$REPO" update $PACKAGE
Note: Ensure you replace $REPO with the repository you want to temporarily enable for this single transaction and $PACKAGE for the package you wish to run the transaction on. If there is no specific package you want to run the transaction on and simply wish to run a full update while disabling or enabling a specific repository, you can remove $PACKAGE from the command.
Comments
0 comments
Article is closed for comments.