Thursday, 10 August 2017

Excluding packages in DNF

In the file /etc/dnf/dnf.conf, you can enter which packages need to be excluded.

I like to exclude java packages, until I am ready for them (as they require a reboot of my application server):
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true
exclude=java*
Or for instance:
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true
exclude=kernel* java*
When I am ready to install all packages, regardless of excludes, I can use the commandline below.
$ dnf -y update --disableexcludes=all

References

Fedora 24: Exclude package from update
https://www.hiroom2.com/2016/07/07/fedora-24-exclude-package-from-update/
SysTutorials - Making dnf/yum Not Update Certain Packages
https://www.systutorials.com/1661/making-dnf-yum-not-update-certain-packages/

No comments:

Post a Comment