Esta é minha resposta de: link
Solução temporária:
Use -C
flag:
sudo yum install foobar -C
Solução permanente:
Use o sinalizador metadata_expire
no seu yum.conf para controlar isso.
Edite /etc/yum.conf
e defina
metadata_expire=15d
Você pode usar d, h ou m para configurar a hora em dias, horas ou minutos .
Bônus: aqui está a documentação:
metadata_expire is Time (in seconds) after which the metadata will expire. So that if the current metadata downloaded is less than this
many seconds old then yum will not update the metadata against the repository. If you find that yum is not downloading information
on updates as often as you would like lower the value of this option. You can also change from the default of using seconds to using
days, hours or minutes by appending a d, h or m respectively. The default is 6 hours, to compliment yum-updatesd running once an
hour. It's also possible to use the word "never", meaning that the metadata will never expire. Note that when using a metalink file
the metalink must always be newer than the metadata for the repository, due to the validation, so this timeout also applies to the
metalink file. Also note that "never" does not override "yum clean expire-cache"