Private repository - update so new rpms can be pulled immediately

13,812

Solution 1

Fge's comment is correct. Every time you add a new rpm to a repository you must run createrepo. Otherwise the repo metadata doesn't get updated so it still sees the previous RPM as the latest version.

Edit: The docs that I linked to that explained the same steps as the answer below by Steve Goodman were removed for some reason, check out that answer instead (https://stackoverflow.com/a/18604484/1263015)

Solution 2

The fastest way to rebuild your repository metadata is to use the --update flag for createrepo:

createrepo --update -v /path/to/repo

This will only process RPMs added to your repo since the last time createrepo was run.

Share:
13,812
Coder1
Author by

Coder1

Web technologies developer/architect.

Updated on June 07, 2022

Comments

  • Coder1
    Coder1 almost 2 years

    I setup a private repository (local mount for now) and built custom rpms. The idea is to build the rpm, add it to the repo, and trigger a yum update mypackage to several servers.

    The problem I'm having is that the newer version of the rpm does not show up... and the old version of the rpm still does, even after I delete it from the repo.

    I've tried yum update and yum clean all but it does not get the latest data in my local repo.

    When I uninstall the package, and re-install it, it tries to install the old rpm that is no longer present, and fails.

    What is the process to update the repo data so I can run updates immediately?

    ** update **

    As I was writing this, I thought to try createrepo . after I updated the rpms. This allowed me to install the latest version.

    Is this what I should run after updating the files?