LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to turn off yum updates (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-turn-off-yum-updates-4175411031/)

suj 06-12-2012 09:16 AM

how to turn off yum updates
 
Hi,

I'm facing some difficulutlies with yum install. When ever I try to install something with yum install it will start updating the repos and taking much time. How should i turn off this updates. it is very much time consuming and waste..

acid_kewpie 06-12-2012 09:39 AM

well those aren't yum updates, but the metadata. Try increasing the metadata_expire value for the repos which is, in seconds, the maximum age of the repo contents.

rknichols 06-12-2012 10:43 AM

You could also run yum with the "--cacheonly" ("-C") option to make it try to perform the operation using only the cached data.

suj 06-12-2012 10:57 AM

Quote:

Originally Posted by acid_kewpie (Post 4701495)
well those aren't yum updates, but the metadata. Try increasing the metadata_expire value for the repos which is, in seconds, the maximum age of the repo contents.

where do i increase this value?

suj 06-12-2012 11:06 AM

Quote:

Originally Posted by rknichols (Post 4701533)
You could also run yum with the "--cacheonly" ("-C") option to make it try to perform the operation using only the cached data.

I have tried using -C option. but get the following error

yum install mod_security -C

mod_security-2.5.12-4.fc15.i686: Caching enabled but no local cache of /var/cache/yum/i386/16/fedora/packages/mod_security-2.5.12-4.fc15.i686.rpm from fedora

maccas17 06-12-2012 11:42 AM

Looks like info for that package is not in your cache, so you can't use the -C option.

maccas17 06-12-2012 12:03 PM

Another thought, what about scheduling a daily cron job to run:

Code:

yum makecache

      makecache
              Is used to download and make usable all  the  metadata  for  the
              currently enabled yum repos.

Then set metadata_expire=never in /etc/yum.conf. (In RHEL6 mine is set to 90m as the default.)

Then it should be updated in the background daily without causing any delay for you. Best of both worlds as your cache remains current without delays to you. :)


All times are GMT -5. The time now is 08:05 PM.