Oracle Linux Basic Administration Series - Part 15 - How to Update and Patch Oracle Linux Safely
- Jason Beattie
- 19 hours ago
- 2 min read
Keeping your Oracle Linux system up to date is essential for security, stability, and performance.
Regular updates fix vulnerabilities, improve compatibility, and ensure your server runs smoothly.
In this blog, you’ll learn how to:
Check for and install updates using dnf
Manage kernel updates
Use Ksplice for live patching (no reboot updates)
Automate and verify system updates safely
Step 1: Check for Available Updates
First, always check what updates are available before applying them.
sudo dnf check-updateThis command lists all packages with newer versions in your repositories.
Example output:

Step 2: Update All Packages
To update the entire system safely:
sudo dnf update -y
After completion, it’s a good idea to reboot if the kernel or core libraries were updated:
sudo rebootYou can simulate an update without actually performing it:
sudo dnf update --assumenoThis shows what will be updated
Step 3: Update a Specific Package
If you want to update just one package (e.g., Apache):
sudo dnf update httpd -yTo install a specific version:
sudo dnf install httpd-2.4.57-1.el9 -yStep 4: Check Kernel Versions and Manage Boot Entries
List installed kernels:
rpm -q kernelView the currently running kernel:
uname -r
After a kernel update, you can reboot into the new version automatically.If you ever need to revert to an older one:
Reboot the system.
At the GRUB menu, choose the previous kernel version.
Step 5: Use Ksplice for Live Patching (No Reboot Needed)
Oracle’s Ksplice technology allows you to apply important security and kernel updates without rebooting your system.
Install Ksplice Uptrack client:
sudo dnf install -y uptrackRegister it with your Oracle account (or ULN subscription):
sudo uptrack-upgrade -y
List installed patches:
sudo uptrack-show
Ksplice is ideal for production servers where uptime is critical.
Step 6: Automate Updates with cron or systemd
To automatically check and install updates, install:
sudo dnf install -y dnf-automaticEdit configuration:
sudo vim /etc/dnf/automatic.confSet:
apply_updates = yesEnable automatic updates:
sudo systemctl enable --now dnf-automatic.timerStep 7: Review Update History
You can see what’s been updated recently:
sudo dnf history
To view details of a specific transaction:
sudo dnf history info <ID>To undo an update (rollback):
sudo dnf history undo <ID>Example:
sudo dnf history undo 10 -yStep 8: Clean Up Old Packages and Cache
After updates, you can free space by removing outdated packages:
sudo dnf autoremove -yClean up cached metadata:
sudo dnf clean all
Step 9: Enable and Manage Oracle Repositories
Check enabled repositories:
sudo dnf repolist
Enable or disable repositories:
sudo dnf config-manager --enable ol8_appstream
sudo dnf config-manager --disable ol8_developerList available ones:
sudo dnf repolist all
Step 10: Verify System Integrity After Updates
After major updates or patches, verify that all key services are running correctly:
sudo systemctl status sshd
sudo systemctl status firewalld
sudo systemctl status httpdRecheck kernel version:
uname -rCheck system logs for post-update errors:
sudo journalctl -p err -b
Conclusion
You’ve learned how to safely update and patch Oracle Linux using both dnf and Ksplice. With regular updates and smart automation, your systems stay secure and reliable with minimal downtime.
This concludes the Oracle Linux Basic Administration Series a complete foundation for anyone starting their journey in Oracle Linux system administration.



Comments