debian version upgrade

How to upgrade without reinstall cuz i keep forgetting…

tldr

[!warning] Make a backup silly!

sudo apt update && sudo apt full-upgrade
sudo apt clean && sudo apt autoremove
#reboot
# Oldschool sources.list
sudo sed -i 's/old/new/g' /etc/apt/sources.list

Old and new are placeholders, check the correct names at the end 1

# New format with one file per repo
find /etc/apt/sources.list.d -name "*.list" -exec sudo sed -i 's/old/new/g' {} \;
sudo apt update && apt list --upgradeable

# see how many
apt list --upgradeable | wc -l
sudo apt upgrade --without-new-pkgs
#try to upgrade rest, if no error occours, try to run one without -s
sudo apt full-upgrade -s
#reboot
#check the version
cat /etc/debian_version
lsb_release -a

sources

  1. https://phoenixnap.com/kb/upgrade-debian-11-to-12
  2. https://github.com/1270011/upgrade-debian-12-to-debian-13

  1. For checking the name of latest version, see https://endoflife.date/debian ↩︎