How to Check & Install Updates on Rocky Linux 8, Almalinux or centOS

Rocky Linux is based on RHEL and the same command which we use on it or CentOS will work on it as well. However, if somebody is totally new to the Linux world and just start using this Linux server distro, then here are the command to follow-

The commands given here are also applicable-

  • CentOS 8/7
  • RedHat 8/7
  • AlmaLinux
  • Rocky Linux

 

Check Available updates for Packages

To know what are updates are available for already installed packages on our Rocky or other similar Linux systems, we can use dnf or yum.

sudo dnf check-update
or 
sudo dnf check-update

The benefit of using this command will give us a list of all the packages their latest version is available to install.

Check Available updates for Packages

 

To install Update Single package

If you don’t want to update all the updates available for the installed packages on your Rocky, CentOS, or AlmaLinux, then we can update any single package as well.

dnf update package-name

For example, there was an update available for Dracut package on our system along with others, thus to update only that I have used its name showing in the available update list along with the above-given command syntax-

dnf update dracut.x86_64

install Update Single package

 

Upgrade all of your system software

In case you want to download and install all the available updates for the system software and core packages, run-

sudo dnf update
or 
sudo yum update

 

Restart (optional)

Although this is not necessary, however, if you have updated some major system packages such as Kernel then it is recommended to reboot the system to apply the changes properly-

sudo reboot

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.