To update the kernel on a Hostinger VPS, create a recovery point, install the kernel update with your operating system’s package manager, restart the server, and check the running kernel version. Kernel updates apply security patches and bug fixes that keep your VPS stable. These steps apply to Hostinger KVM VPS plans running Ubuntu, Debian, AlmaLinux, or Rocky Linux with their standard distribution kernels.
Before you start
- Create a recovery point: Create a VPS snapshot or check your available backups before making changes. Wait for the snapshot to finish before continuing.
- Plan for downtime: Restarting the VPS temporarily interrupts websites, databases, game servers, and other applications running on it.
- Check compatibility: If you use a control panel or software that requires specific kernel versions or modules, check its requirements before updating.
- Use a supported operating system: If your operating system has reached the end of its support period, standard repositories may no longer provide security updates.
Important: These steps update packages within your current operating system release. They do not upgrade your VPS to a new major operating system version.
Connect to your VPS
Connect to your VPS via SSH, or open VPS → Manage → Web Console in your Hostinger dashboard.
The commands below assume you are logged in as root. If you use an account with administrator privileges instead, add sudo before commands that change the system.
Check your operating system and running kernel
Identify your operating system:
cat /etc/os-releaseCheck the kernel currently running on your VPS:
uname -rSave the output so you can compare it after restarting.
Install available updates
Follow the instructions for your operating system below.
Ubuntu and Debian
Refresh the package list:
apt updateIf the command finishes successfully, install available package updates:
apt upgradeReview the proposed changes and enter Y when prompted. This updates installed packages, including the kernel when an update is available and the appropriate kernel metapackage is installed.
Note: This command updates other system packages too. If kernel packages are kept back, investigate the reason before proceeding. Avoid forcing updates or removing packages without reviewing their impact.
AlmaLinux and Rocky Linux
Refresh repository metadata and install available updates for the standard kernel:
dnf --refresh upgrade kernelReview the transaction and enter y when prompted. The package manager installs the updated kernel and its required dependencies.
To update all system packages as well, use the following command instead:
dnf --refresh upgradeImportant: Let the update finish. If you see errors, resolve them before restarting. Do not manually delete files from /boot or remove the currently running kernel to free space.
Restart your VPS
Once the update completes successfully and you are ready for the interruption, restart the server:
rebootYour connection will close during the restart. Wait for the VPS to start, then reconnect. You can also restart it using the Reboot option in your VPS dashboard.
Verify the update
Check the running kernel again:
uname -rIf a newer kernel was installed and selected for boot, the output should show its version. If no kernel update was available, the version may remain unchanged.
Check that your websites, control panel, databases, and other applications work as expected.
Troubleshooting
- No kernel update is available: Your server may already have the latest kernel offered by its configured repositories. Distribution kernel versions can differ from the latest version published on kernel.org.
- The old kernel still runs after restarting: Confirm that a newer kernel was installed. Kernel package holds, exclusions, a missing kernel metapackage, or bootloader settings can prevent the expected update.
- You cannot reconnect: Check the VPS status and try the Web Console. See How to troubleshoot SSH connection issues on VPS for other connection fixes.
- The VPS cannot start: Use Emergency mode to access server files for recovery, or restore your snapshot or backup. Restoring overwrites the current VPS data with the selected recovery point.
Once your VPS restarts on the updated kernel, it runs with the latest security patches and bug fixes from your distribution. Check for kernel updates regularly, and create a fresh snapshot before each update so you can roll back quickly if something goes wrong.