Ask Your Question

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

asked 2013-03-07 15:27:51 -0500

Technog gravatar image

updated 2019-01-10 07:30:20 -0500

hhlp gravatar image

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

answered 2013-03-08 16:02:18 -0500

hhlp gravatar image

updated 2018-11-16 10:01:46 -0500

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.

Changes in DNF 2


Exclude packages of this repository, specified by a name or a glob and separated by a comma, from all operations. Can be disabled using --disableexcludes command line switch.

Source -> conf_ref

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:


#  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


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 ... (more)

edit flag offensive delete link more


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 gravatar imageTechnog ( 2013-03-10 09:59:55 -0500 )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 gravatar imagehhlp ( 2013-03-10 11:29:49 -0500 )edit

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

Technog gravatar imageTechnog ( 2013-03-10 12:43:08 -0500 )edit

@hhlp, while you're at editing, maybe move FEDORA >= 22 part to the top of this answer, since it's more relevant now.

ozeszty gravatar imageozeszty ( 2018-11-16 09:28:08 -0500 )edit

@ozeszty , Done

hhlp gravatar imagehhlp ( 2018-11-16 10:02:26 -0500 )edit

answered 2016-01-15 05:50:17 -0500

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

answered 2016-03-03 20:27:49 -0500

sergiomb gravatar image

Attention to this 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 :

edit flag offensive delete link more

answered 2013-03-09 05:34:34 -0500

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


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 gravatar imageTechnog ( 2013-03-10 09:57:08 -0500 )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 gravatar imagejwakely ( 2016-01-15 05:49:44 -0500 )edit

answered 2013-03-07 19:15:12 -0500

FranciscoD_ gravatar image

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

Question Tools


Asked: 2013-03-07 15:27:51 -0500

Seen: 26,048 times

Last updated: Nov 16 '18