A practical first-hour checklist for a new VPS
Check access, install updates, review open ports and plan recovery before putting a new VPS into service.
Read the guideVPS security · Practical guide
Review package updates, plan restarts and check your application after maintenance.
Archive placement: September 2024

Keeping a VPS updated should be a repeatable maintenance task, not a command pasted into an SSH session and forgotten. Check capacity and backups, read the proposed changes, then verify the running application after any restart. This routine is for Ubuntu package updates; a full operating-system release upgrade is a separate job.
Confirm the console works and you have a recent backup of important files and databases. A VPS recovery point and an application backup serve different purposes; a busy database may need a consistent export. Check the backup date instead of assuming the schedule ran.
Pick a maintenance time that suits your customers. Investigate low disk space or storage errors first, because updates need room to download and unpack files. Keep a way to contact support outside the VPS if the server becomes unavailable.
df -h /
df -i /
ps -ef | grep -E "[a]pt|[d]pkg|[u]nattended-upgrade"A nearly full filesystem or exhausted inodes can prevent an update even when downloads are small. Free space by identifying old backups or documented application logs, not by deleting package-manager files. If another update is active, let it finish. Do not remove apt or dpkg lock files just to silence a lock error; the files protect a real operation.
Check that your backup predates the maintenance and includes the databases you need. If the server is already unhealthy, capture the error and resolve the immediate capacity or storage problem before adding more changes.
These Ubuntu commands refresh package information and show available upgrades. The first updates the package list, not the installed software. Read repository errors before moving on.
sudo apt update
apt list --upgradableUse supported repositories and check the release support period. A successful refresh does not make an end-of-life release supported again. Plan a release upgrade or migration separately from a routine patch session.
Run the upgrade when you are ready to review its confirmation prompt. Pay attention to questions about configuration files you changed, and keep a copy so you can compare them with a new package version.
sudo apt upgradeRestart or reboot when required, after checking recovery access. Updating a package on disk may leave an older process running until it restarts. A kernel update normally needs a reboot before the new kernel is used.
ls /var/run/reboot-required
uname -rIf the marker file is absent, ls will report that it does not exist; that is not itself a maintenance failure. If it is present, plan a reboot. Some library updates also need application or web-service restarts. Read the package messages rather than assuming an installed update is already used by every running process.
Before rebooting, make sure the application has a clean stopping point, alert anyone affected, and confirm console access. After sudo reboot, open a new SSH connection and re-run uname -r. Do not repeatedly reboot a machine that does not come back; inspect its console for boot, disk or filesystem errors.
Open a new SSH connection and check the application from outside the VPS. This command lists units systemd considers failed. It is a useful starting point, not a complete application health check.
systemctl --failedKeep a short note of what changed and what you tested. If something fails, work from package messages and service logs rather than repeating the upgrade. Use your recovery plan if necessary, and resolve the cause before the next maintenance session.
If an upgrade was interrupted, first confirm that no apt, dpkg or automatic-update process is still running. Read the error so you know whether the problem is storage, a repository or package configuration. These recovery commands are for an interrupted package state, not a routine speed-up trick.
sudo dpkg --configure -a
sudo apt --fix-broken installReview any proposed installations or removals before confirming. If a configuration-file prompt appears, compare the file with your saved copy; replacing a customised web-server configuration can bring down the site. When package health is restored, check the service logs and public application again.
Consider Ubuntu’s unattended-upgrades for routine security fixes, but verify its configuration, logs and restart policy rather than assuming it is enabled or complete. Keep notifications and a regular maintenance check. Automatic patching does not replace testing, backups or a planned migration when the OS release reaches the end of support.
Not automatically. It can remove packages to resolve dependencies. Start with apt upgrade, read what is held back, and review any broader change separately before approving it.
Sometimes, but dependencies and database changes can make that unreliable. Diagnose the specific failure first; use a tested recovery point or rebuild plan when a simple configuration correction is not enough.