Skip to content
VDS · Operating systems

Updating the system and packages

How to safely update Debian, Ubuntu, and AlmaLinux: how upgrade and full-upgrade differ, when a reboot is needed, and what to do if an update breaks a service.

Updated August 23, 2026

A fresh system closes vulnerabilities and fixes bugs, but an update is a change, and changes break what works. A sensible approach: update regularly and in small steps, not all at once once a year.

Debian and Ubuntu

apt update
apt list --upgradable
apt upgrade

apt upgrade installs new versions but doesn't remove anything. If the output shows “deferred updates”, you need apt full-upgrade — it allows removals to satisfy dependencies. Read the list of what will be removed before confirming.

Cleanup afterwards:

apt autoremove --purge
apt clean

If a package's config has changed, apt will ask which version to keep. The safe answer is yours (N), then compare it with the new one from the .dpkg-dist file.

AlmaLinux and CentOS Stream

dnf check-update
dnf upgrade
dnf autoremove

dnf places new configs alongside as .rpmnew and saves old ones as .rpmsave. To find them:

find /etc -name "*.rpmnew" -o -name "*.rpmsave"

Reboot and services

An update to the kernel, glibc, systemd, or openssl doesn't take effect until the processes are restarted.

test -f /var/run/reboot-required && echo "reboot required"
needs-restarting -r
systemctl list-units --state=failed

Reboot when you can open a console in the control panel: if the system doesn't come up after a new kernel, you'll fix it via the rescue disk.

Changing release

Upgrading from Debian 12 to 13 or from Ubuntu 24.04 to 26.04 is not a regular update but hours of work and real risk. If the machine has no data that would be painful to migrate, it's cleaner to choose a reinstall with the desired system in the “Access” tab of the panel /hosting/vds/m/<id>: provisioning takes about a minute.

Before changing the release, copy your data off the machine. We don't have automatic backups of the machine, so there will be nowhere to roll back to.

Common errors

ErrorWhat happensSolution
Could not get lock /var/lib/dpkg/lockapt or automatic updates are running in parallelWait, then systemctl status unattended-upgrades
The update was interrupted along with SSHPackages are in a half-installed statedpkg --configure -a, and run it in tmux from now on
Out of disk space/boot is full of old kernelsapt autoremove --purge, remove extra kernels
Service didn't startThe config format changedjournalctl -u <service> -n 50 and fix it

Run long updates in tmux or screen. An SSH disconnect in the middle of apt full-upgrade leaves the system in a half-finished state, and that's already a repair, not an update.

You can take the routine part off your hands — see automatic security updates.