11

I have a repository installed. I want to update that repository with new rpm files. Can I rerun createrepo command on this repository in order to make my new files available to the servers using that repository?

19

You need --update option with createrepo

createrepo --update: Sometimes you have a lot of packages in your repsitory and regenerating the meta data for each package when only a few packages have been added or changed is just too time consuming. This is where --update comes in handy. You run createrepo just like you did before but you pass the --update flag to it. Like this:

  createrepo --update </path/to/repo>  

Now, createrepo will only update the items which have been changed, been added or been removed since the last time the meta data was generated.

Also mentioned in man createrepo

(Reference)

  • 3
    Okay, I'm being a bit pedantic here, but you don't need to use --update. Without it, createrepo will create the metadata just fine. But --update will massively speed it up, especially in large repositories. – Dennis Kaarsemaker Apr 27 '14 at 11:05
0

Yes. After any modification in repo directory, you should run createrepo on it. Of course, clients should run yum clean all before changes are seen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.