English
Ask Your Question
3

How do I make the software updater skip/exclude some packages?

asked 2013-03-07 21:27:51 +0000

Technog gravatar image

updated 2013-03-08 01:31:34 +0000

How can i configure the software updater ??

One of my systems is really tight on space and I would like to "mark" certain packages to never be installed. I will update system software bugs and relevant packages only.

It tells me that it want to update a bunch of packages that I dont want, including a bunch of language fonts that I never want on my system.

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
5

answered 2013-03-08 22:02:18 +0000

hhlp gravatar image

updated 2017-09-12 10:26:17 +0000

How can I exclude selected packages when I rum yum update command under FEDORA <= 21?

Yum uses a configuration file at /etc/yum.conf. You need to place exclude directive to define list of packages to exclude from updates or installs. This should be a space separated list. Shell globs using wildcards * and ?) are allowed.

How do I exclude packaed1 and packed2 when I use "yum update"?

Open /etc/yum.conf file, enter:

nano /etc/yum.conf

Append the following line under [main] section, enter:

exclude=packed1* packed2*

At the end, it should look like as follows:

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3

#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
exclude=packed1* packed2*

Save and close the file. You can now use the yum command as usual but certain package will not install.

How Do I Disable Excludes?

You can use the following syntax:

yum --disableexcludes=all update
yum --disableexcludes=main install packed1
yum --disableexcludes=repoid install packed1 packed2

Where,

all : Disable all excludes
main : Disable excludes defined in [main] in yum.conf
repoid : Disable excludes defined for given repo id

yum --exclude Command Line Option

Finally, you can skip yum command updates on command line itself using following syntax:

yum --exclude=package\* update
yum --exclude=packed1\* update
yum --exclude=packed2\* update
yum -x 'packed1*' -x 'packed2*' update

Note: The above syntax will exclude a specific package by name or glob from updates on all repositories.

Recommend readings:

For more information view the manual page on yum command using the following command:

$ man yum
$ man yum.conf

How can I exclude selected packages when I rum dnf update command under FEDORA >= 22?

With the Command Line

Until a fix is available you can block the offending package from updating by adding an option to the command, replace packagename with the name of the package(s), specified by a name or a glob) and separated by a comma

sudo dnf upgrade --exclude=packagename

In Configuration Files

It is also possible to add the exclude option to the configuration file. If you use a gui update application this is the best option. You will need root permission to edit this file so use su - or prefix the command with sudo. Add exclude=packagename to /etc/dnf/dnf.conf ... (more)

edit flag offensive delete link more

Comments

Thanks. Havent played around with many yum options, so thanks for pointing these out. However, does the software updater pop-up gui use yum in the background ?? So modifying the exclude list should affect the software updater as well ?

Technog ( 2013-03-10 14:59:55 +0000 )edit

@Technog yes gpk-application or software updater in FEDORA 18 also called PackageKit in older version of FEDORA use yum as backend so if you exclude a packed in yum you also exclude that packed for the GUI hth

hhlp ( 2013-03-10 16:29:49 +0000 )edit

Perfect. So, if all updates are centralized via yum, then that makes it a lot easier.to manage. Thanks !

Technog ( 2013-03-10 17:43:08 +0000 )edit
3

answered 2016-01-15 11:50:17 +0000

jwakely gravatar image

The GUI updater is part of PackageKit, and since Fedora 21 is mostly independent from yum (and yum's replacement, dnf).

PackageKit ignores exclude directives in /etc/yum.conf but it does still obey them in the /etc/yum.repos.d/*.repo files defining the package repositories, so you can add exclude=foo bar bz to /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo to prevent PackageKit from trying to install/update those packages.

edit flag offensive delete link more
1

answered 2016-03-04 02:27:49 +0000

sergiomb gravatar image

Attention to this bug : https://bugzilla.redhat.com/show_bug....

PackageKit ignores exclude in /etc/dnf/dnf.conf

Software updates applet ignores excludes in dnf.conf

KDE system tray tool not honor dnf.conf keepcache=1

Software Updates widget ignores dnf versionlock plugin

etc, here is one workaround : https://bugzilla.redhat.com/show_bug....

edit flag offensive delete link more
0

answered 2013-03-08 01:15:12 +0000

I'm not sure if the software updater has these advanced options. You can edit your /etc/yum.conf file and add exclude directives to it. Please take a look at man yum.conf for more information.

edit flag offensive delete link more
0

answered 2013-03-09 11:34:34 +0000

Peter Scott gravatar image

Why don't you simply erase the packages you do not want to update:

# yum erase package1 ....

Then you won't waste space or bandwidth because only installed packages get updated.

(I don't use the GUI software updater but is seems inconceivable that it offers to update packages that haven't been installed.)

edit flag offensive delete link more

Comments

I am aware of erasing, but my question was more for the gui that pops up in fedora. I was trying to figure out what process that was ... hard too. As stated in my orig post, the software updater pop up gui had many packages that I didnt want, including languages that I would never need on my system. Unchecking each one was cumbersome and annoying. So yes, it does try to update/install packages that I dont really need. And not to mention, I'd rather do it upfront than after the fact. Thanks for the suggestion though.

Technog ( 2013-03-10 14:57:08 +0000 )edit

That suggests you already have those packages, and it's prompting you to update them. The only time it should suggest installing _new_ packages is when they are required by something else being updated, so if you exclude them you won't be able to update some of the packages you do want. So make sure you really have erased packages you don't want, and you should not get prompted to update them.

jwakely ( 2016-01-15 11:49:44 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2013-03-07 21:27:51 +0000

Seen: 14,136 times

Last updated: Sep 12