Disabling package updates from Yum in Centos and AlmaLinux
Sometimes it happens that we don't want a package to get updated with the rest after running yum update.
Today, a simple way to block a given package from updating with the rest.
We log into the terminal and edit 2 files:
1 | nano /etc/yum.conf |
And
1 | nano /etc/dnf/dnf.conf |
And we search for or add a line:
1 | exclude=httpd php mysql |
It is located in the section:
## Exclude following Packages Updates ##
1 | httpd php mysql |
We replace with packages that we want not to be updated.