LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-12-2012, 09:16 AM   #1
suj
Member
 
Registered: Dec 2009
Posts: 33

Rep: Reputation: 1
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..
 
Old 06-12-2012, 09:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 06-12-2012, 10:43 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,787

Rep: Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217
You could also run yum with the "--cacheonly" ("-C") option to make it try to perform the operation using only the cached data.
 
Old 06-12-2012, 10:57 AM   #4
suj
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
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?
 
Old 06-12-2012, 11:06 AM   #5
suj
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by rknichols View Post
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
 
Old 06-12-2012, 11:42 AM   #6
maccas17
Member
 
Registered: May 2010
Location: UK
Distribution: RHEL6
Posts: 70

Rep: Reputation: 11
Looks like info for that package is not in your cache, so you can't use the -C option.
 
Old 06-12-2012, 12:03 PM   #7
maccas17
Member
 
Registered: May 2010
Location: UK
Distribution: RHEL6
Posts: 70

Rep: Reputation: 11
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.
 
  


Reply

Tags
yum


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Yum client package/updates installation and updates through local Yum Server gautamnarayan Linux - Server 1 03-11-2010 01:51 AM
got a Fedora 9 indication that yum updates were available, but there were no updates landonmkelsey Linux - Software 12 02-08-2009 09:53 AM
updates with yum chakka.lokesh Fedora 20 05-14-2008 01:24 AM
yum check-update says no updates when there are updates? MarkEHansen Linux - General 7 12-29-2006 05:16 PM
yum updates pulisubs Linux - Newbie 2 12-20-2004 10:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration