LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   yum command to exclude some updates? (http://www.linuxquestions.org/questions/fedora-35/yum-command-to-exclude-some-updates-507977/)

gimmee 12-06-2006 03:35 PM

yum command to exclude some updates?
 
Hi all

I want to do the command 'yum -y update' to update my 64bit FC5, but I dont want it to update my 32 bit firefox (with the update command it says its going to update it to the 64 bit version), and I dont want to update the kernel yet.

Is there an exclude command that can go with the 'yum update' to stop it updating firefox or the kernel but everything else can be done.

Maybe I should use yummex.

Look forward to any comments you have in regards to this.

Cheers

hob 12-06-2006 03:41 PM

Yes, you can exclude packages by name - see the man page for yum.

gimmee 12-06-2006 03:53 PM

Thanks for that

yum --exclude=firefox --exclude=kernel update

Will try this when I get home

Cheers

itsme_sujith 01-29-2010 04:21 AM

If you want exclude php and mysql then open

vi /etc/yum.conf

Append the following

exclude=php* mysql*

It will look like

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
exclude=php* mysql*
# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d



Another Example

To exclude i686 packages
Just add
exclude=*i686


Command line option

You can exclude packages in comman line also
Just Add
yum --exclude=php* update

will exclude php from update

John VV 01-29-2010 05:16 AM

itsme_sujith
PLEASE do not dig up and post to 4 year old threads

CarlMGregory 10-29-2010 12:01 PM

@itsme_sujith

Thank you.



@John VV

Pssh! Whatever dude! Time is irrelevant. 10 years old or 10 minutes, he still answered a question I was googling for, and because of his post I found the answer.

astutus 01-06-2013 10:15 AM

sometimes it's good to dig up. I've used this post after 6 years ;)

dman77 03-26-2013 01:52 PM

I agree I just used this post today and it helped me. So I'm glad that "itsme_sujith" posted to a four which is a six year post now.

lost dragon 03-16-2014 03:15 AM

^ and ^^ and ^^^
this information was precisely what i was searching for.

to add I found some issues with the exclusion and i always prefer the cli updates.
so, i did this.

yum --exclude=xorg* --skip-broken update

and that allowed me to update (about) 900 packages after a new install and prevent a brand new video card from getting a driver that was crashing X.

yum update was planning on 10+ xorg-X11 updates when the default one is working perfectly.

this is a time proven thread.
ASUS geforce GT 630(silent) 0dB, 2GB DDR3,
is actually an NVIDIA corp GK208 Board - 21320
and yums update was pushing unstable updates...

the above command allows all updates, while suppressing anything begining with xorg (in my case about 10 small files, the * is a wildcard ) and ignored all the dependencies associated with them.

thank you itsme_sujith, for taking the time to extend the (valuable) details, and the OP too.


All times are GMT -5. The time now is 09:00 PM.