How to Update a Linux VPS Print

  • linux
  • 0

How to Update a Linux VPS

Keeping your Linux VPS updated is important for security, stability, and software compatibility. Regular updates can include security patches, bug fixes, performance improvements, and newer versions of installed packages.

ApnCloud Cloud VPS Hosting is an unmanaged service, so customers are responsible for maintaining and updating their own operating system, installed software, applications, security settings, and backups.

1. Connect to Your VPS Using SSH

First, connect to your Linux VPS using SSH.

Open Windows Terminal, PowerShell, Terminal, or another SSH client and enter:

ssh root@YOUR_SERVER_IP

Replace YOUR_SERVER_IP with the actual IP address of your VPS.

If your server uses a different administrative username, use that username instead of root.

2. Check Your Linux Distribution

Before running any update command, confirm which Linux distribution is installed.

Use:

cat /etc/os-release

This usually shows whether your server is running Ubuntu, Debian, AlmaLinux, Rocky Linux, or another Linux distribution.

3. Update Ubuntu or Debian

For Ubuntu or Debian-based systems, first refresh the package list:

apt update

Then install available updates:

apt upgrade -y

For more complete package upgrades, you may also use:

apt full-upgrade -y

Review major changes carefully before using full-upgrade on an important production server.

4. Update AlmaLinux or Rocky Linux

For AlmaLinux and Rocky Linux, use:

dnf update -y

On some older compatible systems, this command may also be available:

yum update -y

Wait until the update process finishes before closing your SSH session.

5. Check Available Disk Space

Before performing major updates, make sure your VPS has enough free disk space.

Use:

df -h

If the disk is nearly full, updates may fail or installed services may stop working correctly.

6. Check Whether a Reboot Is Required

Some system updates, especially kernel updates, may require a server reboot.

On Ubuntu or Debian, you can check with:

test -f /var/run/reboot-required && echo "Reboot required"

If a reboot is required, plan it at a suitable time to avoid unnecessary downtime.

7. Reboot the VPS

If necessary, reboot the server using:

reboot

Your SSH session will disconnect automatically.

Wait for the VPS to come back online, then reconnect using SSH.

8. Verify Important Services

After the update and reboot, make sure your important services are running correctly.

You can check for failed system services with:

systemctl --failed

Also verify any important software you use, such as:

  • Web server
  • Database server
  • Hosting control panel
  • Website applications
  • Mail services
  • Firewall
  • Other custom services

9. Remove Unused Packages

On Ubuntu or Debian, unused packages may sometimes be removed with:

apt autoremove

Review the package list before confirming removal on a production server.

Do not remove packages unless you understand what they are used for.

10. Test Your Websites and Applications

After completing updates, test the services running on your VPS.

Check that:

  • Websites load correctly
  • Databases are working
  • Applications start normally
  • Control panels are accessible
  • SSL certificates work
  • Important ports remain accessible
  • No critical service is failing

Important Update Recommendations

Before major updates:

  • Keep a recent backup of important data
  • Review major package changes
  • Avoid interrupting package installation
  • Perform major updates during a suitable maintenance period
  • Check application compatibility
  • Verify services after rebooting

Avoid Unnecessary Major Upgrades

Routine package and security updates are important, but upgrading to a completely new operating system version is a larger task.

Major operating system upgrades can affect:

  • PHP versions
  • Databases
  • Hosting control panels
  • Web servers
  • Applications
  • Custom configurations

Always review compatibility and maintain a backup before performing a major OS upgrade.

Important: Unmanaged VPS Responsibility

ApnCloud Cloud VPS Hosting is provided as an unmanaged VPS service.

Customers are responsible for operating system updates, software management, security, backups, applications, and server configuration.

Need Help?

If your VPS becomes unreachable due to an ApnCloud service or infrastructure issue, please open a Support Ticket from your ApnCloud Client Area.

Include your VPS IP address and a clear description of the problem. Never include your root password or private SSH key in a support ticket.


Was this answer helpful?

Related Articles

« Back