Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My job let me always release a new version of the program to a satellite server, then in the running server, I use yum update program to update the program.

However, due to unknown reason, in most of times, even if I upload the program to the satellite server, yum update program can't get the update soon. I always have to wait, keep retrying, etc.

So anyone can tell me how to write a script, so

  1. it keeps retrying yum update program if no update available
  2. if update is available, then the update in yum is forced
  3. after successful update, the script quits.


share|improve this question

From man yum.conf on Fedora 17:

retries Set the number of times any attempt to retrieve a file should retry before returning an error. Setting this to '0' makes yum try forever. Default is '10'.

So, in /etc/yum.conf, under the [main] section, does it help to define retries?

Also, there is a yum-updatesd package that can be installed. If it is available, one could edit /etc/yum/yum-updatesd.conf to enable automatic updates:

#do_update = no
do_update = yes

And then restart yum-updatesd.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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