I'm using CentOS I've built a repository and put packages on it ,testing from another server and all things are fine.

When I added new packages on repository and execute:

$ createrepo -v /var/www/html/centos/6.5/updates/x86_64/Packages/

Trying to install the last package recently added from a server that added my repository but it's not working until I execute on the same server:

$ yum clean all

Is this a normal situation?

  • You haven't mentioned the CentOS and yum versions. – Cristian Ciupitu May 29 '14 at 17:12

This is "normal" behavior in so far that the servers where you call "yum update" do keep a cache of the packages available on the repo. When you call "yum clean all", this cache is deleted, and the server needs to ask the repo again for a list of available packages - including your just added package.

What actually happens

  1. you add a new package to the repository on machine A
  2. you call createrepo - the repository information are updated
  3. you jump to server B where the repo of machine A is included
  4. you call "yum update" on B - the last yum run was not that long ago, thus yum does not (!) connect to A, but only checks the local cache; since the local cache is, let's say, some hours old, your new package is not listed there
  5. now, since you are upset, you call "yum clean all" on B [you could also just wait some time]
  6. all cache is deleted on B
  7. another call of "yum update" on B forces B to connect to the server, pulling all current data - and thus being able to see your new package
  • the CentOS automatically update all repo except my repo in each install like 'epel' how to force all client to auto update ? – Steve Jun 9 '14 at 21:33
  • Hm, you can still alter the default behaviour with flags like keepcache. How about you set, for an experiment, the option to "0" in yum.conf and make sure that it is not set in the repo configuration itself. Than the cache is not kept, and the repository information are updated each time yum runs. – liquidat Jun 11 '14 at 16:10

This doesn't sound like correct behavior to me. The RPMs that YUM downloads are kept in their own directories under /var/cache/yum.


From a Fedora 19 system:

$ pwd

Notice all the directories, there is one per repository:

$ tree . -L 3 -d
`-- x86_64
    `-- 19
        |-- fedora
        |-- fedora-debuginfo
        |-- google-chrome
        |-- home_pstavirs_ostinato
        |-- home_tpokorra_mono
        |-- livna
        |-- livna-debuginfo
        |-- rpmfusion-free
        |-- rpmfusion-free-debuginfo
        |-- rpmfusion-free-updates
        |-- rpmfusion-free-updates-debuginfo
        |-- rpmfusion-nonfree
        |-- rpmfusion-nonfree-debuginfo
        |-- rpmfusion-nonfree-updates
        |-- rpmfusion-nonfree-updates-debuginfo
        |-- rpm-sphere
        |-- updates
        |-- updates-debuginfo
        `-- virtualbox

21 directories
  • The problem occurs in the server that added my repo – Steve May 29 '14 at 22:49

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.