Keeping your server’s packages and kernel up to date is one of the most important things you can do to maintain security and stability. This guide covers how to run a full system update, including the kernel, on all major Linux distributions. The steps below apply whether you’re responding to a security advisory or just keeping on top of routine maintenance.
Before you begin: Take a backup or snapshot of your server or critical files/databases before running a kernel update. A reboot is required to load the new kernel.
Ubuntu & Debian
Refresh the package lists, then upgrade all packages including the kernel:
sudo apt update && sudo apt upgrade -y
Optionally, remove old packages and dependencies that are no longer needed:
sudo apt autoremove
Reboot to load the new kernel:
sudo reboot
AlmaLinux, Rocky Linux, CentOS, RHEL-based distributions & Fedora
Optionally, check what updates are available before applying them:
sudo dnf check-update
Upgrade all packages including the kernel:
sudo dnf upgrade
Reboot to load the new kernel:
sudo reboot
Arch Linux
Before upgrading, check the Arch Linux news page for any breaking changes that may require manual intervention. Then refresh the package databases and upgrade:
sudo pacman --sync --refresh --sysupgrade
Reboot to load the new kernel:
sudo reboot
Verify the update
After rebooting, confirm the running kernel version:
uname -r
The output should reflect the newly installed kernel version. You can cross-reference this against your distribution’s security advisories to confirm the relevant patches are included.
How often should I update?
We recommend running a full system update at least monthly, and immediately whenever a critical security advisory is published for your distribution. Subscribing to your distro’s security announcement mailing list is a good way to stay informed.
If you’d prefer not to manage updates yourself, get in touch to find out about our managed server options.