CentOS Stream 8 Update Commands
CentOS Stream 8 is different from traditional CentOS versions as it follows a rolling-release model, meaning it receives continuous updates. For this reason, it's important to regularly update the system to maintain stability and security. Below are the basic commands used to update a CentOS Stream 8 system, along with their explanations.
To upgrade all available packages on your system to the latest versions, use the following command:
dnf update -y
This command checks for all upgradable packages, downloads, and installs them. The "-y" flag automatically answers "yes" to any confirmation prompts.
Alternatively, you can also use:
dnf upgrade -y
This performs a similar update process and brings the system up to date.
If you want to update only a specific package, use:
dnf update package_name
For example, to update only the Apache HTTP server:
dnf update httpd
Kernel updates are usually included in the general system updates in CentOS Stream 8. However, after a kernel update, a system reboot is required. You can reboot with the following command:
reboot
To remove cached data and clean up unnecessary files after updates, you can run:
dnf clean all
This command deletes unused package files from the cache.
To view a list of packages that can be updated, without actually installing them, use:
dnf check-update
This lists the available updates for your system.
By running these commands regularly, you can keep your CentOS Stream 8 system secure and up to date. In server environments, it's a good practice to schedule these updates weekly or even daily using automated tasks.
You have examined the knowledge base in detail, but if you cannot find the information you need,
Create a Support Ticket