CentOS Stream 9 Update Commands
CentOS Stream 9, like its predecessor CentOS Stream 8, is a rolling-release distribution. This means it receives continuous updates, allowing access to newer packages and improvements earlier. However, to keep the system stable and secure, regular updates are necessary.
Below are the basic commands used to update CentOS Stream 9 systems along with explanations.
1. Update All System Packages
To update all packages on your system, use the following command:
dnf update -y
This command checks for available package updates, downloads, and installs them. The "-y" option automatically answers "yes" to confirmation prompts.
Alternatively, you can also use:
dnf upgrade -y
This command performs a similar function by upgrading all system packages to the latest versions.
2. Update a Specific Package
If you want to update only a specific package, use:
dnf update package_name
For example, to update only the nginx package:
dnf update nginx
3. Kernel Update
Kernel updates usually come bundled with the general system updates in CentOS Stream 9. After a kernel update, the system needs to be rebooted. You can reboot with:
reboot
4. Clear DNF Cache (Optional)
To clean the package cache and free up disk space after updates, run:
dnf clean all
This removes unnecessary cached package files.
5. Check Available Updates
To list available updates without installing them, use:
dnf check-update
This command only displays which packages can be updated.
By running these commands regularly, you can keep your CentOS Stream 9 system up to date, fast, and secure. In server environments, automating these updates is considered good practice.
Can't find the information you're looking for?
You have examined the knowledge base in detail, but if you cannot find the information you need,
Create a Support Ticket-
How to Open Ports in Windows?
297 2
-
How to Grant Windows Administrator Privileges?
222 0
-
How to install Webmin on Ubuntu?
874 2
-
Linux SSH Terminal Commands and Explanations
784 3
-
CentOS Stream 10 Update Commands
843 1
-
CentOS Stream 9 Update Commands
1230 2
-
CentOS Stream 8 Update Commands
666 0
-
What is FreeBSD?
847 2
-
Out: 452 4.3.1 Insufficient system storage
760 2
-
Turning Off Automatic Updates in Windows Operating Systems
875 0