Linux yum command skip updating packages

Linux yum command skip updating packages

To skip updating certain packages when using the yum package manager on a CentOS or Red Hat Enterprise Linux (RHEL) system, you can use the --exclude option.

For example, to update all packages except for the kernel package and any packages that depend on it, you can run the following command:

refer to‮uttual:‬ri.com
sudo yum update --exclude=kernel*

This will update all packages except for the kernel package and its dependencies.

You can specify multiple packages to exclude by separating them with a comma. For example, to update all packages except for the kernel and httpd packages:

sudo yum update --exclude=kernel*,httpd

You can also specify a wildcard pattern to exclude multiple packages at once. For example, to exclude all packages that start with php-:

sudo yum update --exclude=php-*

Note: The yum package manager will not update packages that are already at the latest version. If a package is already at the latest version, it will be skipped regardless of the --exclude option.

Note: It is a good idea to test the effects of excluding packages in a staging environment before deploying the updates in a production environment. Skipping updates can leave your system vulnerable to security vulnerabilities and other issues. It is important to keep your system up to date with the latest security updates and bug fixes.

Created Time:2017-10-16 14:38:53  Author:lautturi