Thursday, April 16, 2015

Use a specific repo for installing a package

I was facing an issue at work today where I needed to install a package from a repo. The repo for that package had been created in yum. However, one of the other repos had an issue where the url for that repo was not reachable and this caused "yum install" to fail for me constantly. 

 So I wanted to a way to install my package from a particular repo and not involve any other repo. The only way I found to do this is to disable all other repos and enable only the repo I want and install the package from it. 

To do that:

yum --disablerepo="*" --enablerepo="reponame" install pkgName

You can substitute reponame and pkgName with the names of the actual repo you want to use and package you want to install.

No comments:

Post a Comment