Skip to main content

Linux Upgrade Guide

Commands & procedures for major distributions

⚡ Pro Tip: Always backup your data with rsync, Timeshift, or Clonezilla and check available disk space with df -h before any upgrade.
🟠
Ubuntu / Linux Mint
APT-based
LTS
Update current packages
sudo apt update && sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
Upgrade to next release (e.g. 22.04 → 24.04)
sudo do-release-upgrade
# For LTS-to-LTS upgrades:
sudo do-release-upgrade -d
🔵
Debian
APT-based
POINT
Update current packages
sudo apt update && sudo apt upgrade -y
sudo apt full-upgrade -y
Upgrade release (e.g. Bullseye → Bookworm)
# Point sources to new release
sudo sed -i 's/bullseye/bookworm/g' \
  /etc/apt/sources.list
sudo apt update
sudo apt full-upgrade -y
🎩
Fedora
DNF-based
POINT
Update current packages
sudo dnf upgrade --refresh -y
Upgrade release (e.g. Fedora 39 → 40)
sudo dnf install dnf-plugin-system-upgrade -y
sudo dnf system-upgrade download --releasever=40
sudo dnf system-upgrade reboot
🦎
openSUSE
Zypper-based
ROLLING
Tumbleweed (rolling — just update)
sudo zypper refresh
sudo zypper dist-upgrade
Leap version upgrade (e.g. 15.5 → 15.6)
sudo zypper refresh
sudo zypper dist-upgrade --from <new-repo-url>
🏹
Arch Linux
Pacman-based
ROLLING
No version jumps — just update continuously
sudo pacman -Syu
With AUR packages (using yay)
yay -Syu
🐉
CentOS / AlmaLinux / Rocky
DNF / RPM-based
ENTERPRISE
Update packages
sudo dnf update -y
Migrate CentOS 7 → AlmaLinux
sudo dnf install almalinux-deploy
sudo bash almalinux-deploy.sh
🟣
Kali Linux
APT-based
ROLLING
Update & full upgrade
sudo apt update && sudo apt full-upgrade -y
sudo apt autoremove -y
🟡
NixOS
Nix-based
DECLARATIVE
Update channel
sudo nix-channel --update
Switch to new release (e.g. 23.11 → 24.05)
sudo nix-channel --add \
  https://nixos.org/channels/nixos-24.05 nixos
sudo nixos-rebuild switch --upgrade
Step Tool / Command Notes
Backup data rsync / Timeshift / Clonezilla Never skip this step
Check disk space df -h Need 5–10 GB free minimum
Read release notes Distro's official site Check for breaking changes
Snapshot VM VirtualBox / VMware Instant rollback if needed
Stable power & connection — Avoid laptops on battery
🔄
Rolling Release
No version jumps — continuous updates. Used by Arch, Tumbleweed, Kali. Always on the latest software.
📌
Point Release
Periodic major versions requiring explicit upgrades. Ubuntu, Fedora, and Debian follow this model.
🛡️
LTS Support
Long Term Support — stable, infrequent updates. Ideal for servers. Ubuntu LTS supported for 5 years.