FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2006
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to lock an older package and stop yum from updating it.

    Is there some way to tell yum not to update a particular package, so it gets ignored if I do:

    # yum update


  2. #2
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    16,569
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)
    You could add the name of the package to /etc/yum.conf as an exclude line.
    Code:
    exclude=foo*.
    That would tell yum to ignore anything that starts with foo. Of course, you could be more specific with the package name too. The exclude line in my yum.conf has kde* in it. I installed KDE last week and decided it is still not for me but I don't want all the KDE stuff updated. On another computer, I don't need OpenOffice (don't use it on that computer) so the exclude line contains openoffice*. All OpenOffice updates are ignored. Here's a sample
    Code:
    [glenn@laptopbeta ~]$ cat /etc/yum.conf
    [main]
    cachedir=/var/cache/yum
    keepcache=0
    debuglevel=2
    logfile=/var/log/yum.log
    exactarch=1
    obsoletes=1
    gpgcheck=1
    plugins=1
    installonly_limit=3
    exclude=kernel-PAE* kde*
    On the other computer.
    Code:
    exclude=openoffice* kernel-PAE*
    After you make the change to the .conf file you can use yum in verbose mode to. It will show that the files are being ignored.
    Code:
    yum update -v

  3. #3
    Join Date
    Nov 2006
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that informative reply glennzo. Does the exclude keyword work with any/all yum transactions?

    Eg. If I use a seperate yum.conf file to install all packages in a group except for those mentioned on an exclude line, like this:

    Code:
    # yum -y -c /etc/yum/yum-use-all-pkgs.conf groupinstall "group name"
    #
    # to install all packages for a particular groupinstall
    
    [main]
    **snip**
    
    # use all packages when installing a particular group
    # group_package_types
    #   List of the following: optional, default, mandatory. Tells yum
    #   which  type  of  packages  in  groups  will  be installed when
    #   ’groupinstall’ is called.  Default is: default, mandatory
    #
    group_package_types = default, mandatory, optional
    
    exclude=openoffice*
    and then do:

    yum -y -c /etc/yum/yum-use-all-pkgs.conf groupinstall "Office/Productivity"

    would that install everything in the above package, apart from OO?

    Another question - does the yum.conf file support including other yum.conf type configuration files, like C's #include does?

    That would be a handy feature - save having to keep replicating the same stuff in customized yum.conf files.

  4. #4
    Seve's Avatar
    Seve is offline Retired Community Manager
    Join Date
    Oct 2004
    Location
    The GTA, Ontario, Canada
    Age
    68
    Posts
    12,371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello:
    Any transaction that you process through your /etc/yum.conf or your version thereof will be subject to the restrictions/options that you have added.
    i.e. your exclusion of openffice.org should do just that.

    Take a minute and test it to confirm.

    Have a look at the latest man page etc. for yum.conf to find out what options are available to you.
    http://yum.baseurl.org/

    Seve
    Registered Linux User: #384977
    .................................................. ............
    See the Links below for more Help and those much wanted extras ... :)


  5. #5
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    16,569
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)
    Getting a little too deep and complicated for me there CD-RW. Use Seve's advice, use the exclude line since you can have more than 1 exclude, like exclude=foo* bar* kde*, and remember that you can also use exclude on the command line, such as yum --exclude=openoffice* update.

    What are you trying to accomplish with yum. What do you want locked, as per your original question?

  6. #6
    Join Date
    Nov 2006
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wanted to lock a particular package to an earlier version on F10. But this doesn't solve the problem I had with it anyway, as I downgraded it with Smart, and the problem still persists.

    Even so, it is handy to know about the excludes stuff for yum.

    Is this all documented in 'pinfo yum.conf'

  7. #7
    Join Date
    Nov 2006
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that link Seve. I've bookmarked that now. Will be popping over there STS.


  8. #8
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    16,569
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)
    man yum.conf may be a better choice here. There is also a long list of yum plugins. Try, in a terminal,
    Code:
    yum list yum*

Similar Threads

  1. Older version of package gone from YUM...where can I get it?
    By rweed in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 7th August 2007, 12:21 AM
  2. Removing older kernels after updating.
    By spfdz in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 11th May 2006, 05:06 PM
  3. Installing an older package
    By judith in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 30th December 2005, 07:29 AM
  4. Installing an older package
    By judith in forum Using Fedora
    Replies: 2
    Last Post: 30th December 2005, 01:15 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •