CentOS 8/9 update installed packages for security

To update installed packages for security on CentOS 8/9, you can use the yum command as the root user or with sudo.

  1. Update the package index by running the command sudo yum update. This command will update all installed packages to the latest version.
  2. You can also update specific packages by providing the package name after the update command. For example, sudo yum update httpd will update the Apache httpd package.
  3. Another option is to update only security-related packages by running the command sudo yum update --security.
  4. To check for updates on a regular basis, you can use the command sudo yum check-update or install yum-cron package and configure it to automatically update your system with sudo yum install yum-cron; sudo systemctl enable --now yum-cron.

Note: Before updating packages, it is recommended to take a backup of your system and important files, and test updates in a development environment.

Leave a Comment