Hostxpeed
Login Get Started →
Getting Started

How to Update Your VPS Server

6 min read
24 views
Jun 13, 2026

Prerequisites

Before updating your server, make sure you have:

  • SSH access to your VPS (username: hxroot)
  • Your server IP address
  • Root or sudo user password

Why Regular Updates Are Important

Keeping your server updated is critical for:

  • Security - Patches for known vulnerabilities
  • Performance - Bug fixes and optimizations
  • Stability - Improved system reliability
  • Compatibility - Support for new software versions

Method 1: Update Ubuntu/Debian Servers (APT)

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22

Update package lists (checks for available updates):

apt update

Upgrade all packages to latest versions:

apt upgrade -y

For a full system upgrade (including kernel):

apt full-upgrade -y

Remove unnecessary packages:

apt autoremove -y

Reboot if kernel was updated:

reboot

Method 2: Update CentOS/Rocky/AlmaLinux (YUM/DNF)

For CentOS 7 and older:

yum update -y

For Rocky/AlmaLinux 8+ and CentOS 8+:

dnf update -y

Clean up old packages:

dnf autoremove -y

Method 3: Set Up Automatic Security Updates

For Ubuntu/Debian, install unattended-upgrades:

apt install unattended-upgrades -y
dpkg-reconfigure --priority=low unattended-upgrades

Select "Yes" when prompted to enable automatic updates.

For CentOS/Rocky, enable automatic updates:

yum install dnf-automatic -y
systemctl enable --now dnf-automatic.timer

Check Your Current OS Version

lsb_release -a

Or for older systems:

cat /etc/os-release

Check Available Updates Without Installing

Ubuntu/Debian:

apt list --upgradable

CentOS/Rocky:

yum check-update

View Update History

Ubuntu/Debian:

grep " install " /var/log/dpkg.log

CentOS/Rocky:

yum history

⚠️ Important: Always back up important data before running major system updates. Some updates may require a server reboot.

Best Practices

  • Run updates at least once a week
  • Test updates on a staging server first (if possible)
  • Schedule updates during low-traffic hours
  • Keep a backup before kernel updates
  • Monitor your server after updates

Was this article helpful?