You are here: Home . Code, Linux . How to update your local yum repo

How to update your local yum repo

There are a number of  great resources on how to set-up a local yum repo. This one from Digital Ocean is particularly good:

How though do you update the said yum repo? I needed to upgrade bash on some hosts to protect them against being ShellShock-ed. This required an upgrade to the local repo from which all these hosts retrieve their updates. Here’s what worked for me:

  1. Download the rpm for the package you’d like to update in your repo
  2. Place the rpm in your repo’s Packages folder
  3. Then
    cd /the/repo/dir
    createrepo . #{Don't leave out the .}
    yum clean expire-cache
    yum list --showduplicates package 
  4. The package you’ve added should appear under Available Packages. If it does, on the clients you can now run
    yum update package

Using diligent minions, I bring these tutorials & tips to your inbox every week. Give a minion work today; add your email address here