Package downgrades and holds can leave dependencies inconsistent. Document what you change and test services after any rollback.
What you will achieve
Clear distinction between apt upgrade, full-upgrade, and do-release-upgrade — when each is safe on Debian/Ubuntu servers and desktops.
1) Regular upgrades (same release)
sudo apt update
sudo apt upgrade -y
Installs newer package versions within your current release (e.g. Ubuntu 24.04 point releases). Does not remove packages unless a new dependency requires it — usually conservative.
2) full-upgrade (dist-upgrade)
sudo apt full-upgrade -y
Allows apt to install or remove packages to resolve dependency conflicts. Use when apt upgrade reports broken dependencies or held-back packages. On Debian, apt dist-upgrade is an alias.
3) Release upgrade (new major version)
sudo apt update && sudo apt upgrade -y
sudo do-release-upgrade
Moves 22.04 → 24.04 by switching apt sources. Requires backups, reading release notes, and often a reboot. Not the same as daily patching.
4) Fedora equivalent
sudo dnf upgrade --refresh
sudo dnf system-upgrade download --releasever=42
sudo dnf system-upgrade reboot
Verify
lsb_release -a
apt list --upgradable
5) When to defer full-upgrade
Production servers during peak season: run apt upgrade for security only, hold packages that require service restarts, and schedule full-upgrade in maintenance windows when dependency removals are acceptable.
6) Release upgrade prerequisites
- Full backup and snapshot.
- Remove obsolete third-party repos pointing at old codenames.
sudo apt update && sudo apt upgradeuntil clean.- At least 5 GB free on
/.
7) Debian release upgrades
Debian moves conservatively — edit /etc/apt/sources.list to next stable, apt update, apt full-upgrade, reboot, repeat until target release. Use apt-listchanges to read conffile prompts.
Rollback reality
Neither full-upgrade nor release upgrade has a one-click undo. BTRFS snapshots, LVM snapshots, or VM snapshots are your rollback mechanism — plan before not after.
8) LTS point release vs do-release-upgrade
Staying on Ubuntu 22.04 but moving 22.04.3 → 22.04.5 is normal apt upgrade, not do-release-upgrade. The latter jumps 22.04 → 24.04.
Prerequisites
Root or sudo, stable network, snapshot or backup, and read access to distro release notes. For Ubuntu LTS→LTS, expect 30–90 minutes and interactive conffile prompts.
Monitoring during upgrade
tail -f /var/log/dist-upgrade/main.log
Ubuntu do-release-upgrade logs here — grep ERROR before rebooting if anything looks off.
Staging on test VM
Clone production apt sources to a test VM, run full-upgrade and release-upgrade there first — surfaces dependency removals before touching prod.