Upgrading between major versions of Debian

Here I will document the process of upgrading from each major version release to the next.

Between each version, there are subtle differences to watch for in each line of code. When a release is archived, the hostname changes and the <…> paths are removed. Some have naming convention changes.

Also, it is a good idea to know the different between ‘apt upgrade’ and ‘apt full-upgrade’. ‘upgrade’ will do its best to upgrade all available packages without uninstalling existing packages. ‘full-upgrade’ will forcibly remove packages to make sure all upgrades are installed. This can sometimes generate chaos in your system and do things that you would not normally have done. Installed programs might disappear. And other things might stop working due to missing dependencies.

Before proceeding with any distribution upgrade between major release versions, make sure your current installation is fully up-to-date.

sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt --purge autoremove

Once you have performed all the above actions, if there were any core OS updates applied be sure to restart your system for those to take effect. Once you have done this, you can move on with the following instructions.

Upgrade from Debian 9 (stretch) to Debian 10 (buster)

***Buster is now found in the archive repo.***

Update your source file: ‘/etc/apt/source.list’

deb http://archive.debian.org/debian/ buster main contrib non-free
deb http://archive.debian.org/debian-security buster/updates main contrib non-free
deb http://archive.debian.org/debian/ buster-updates main contrib non-free

deb-src http://archive.debian.org/debian/ buster main contrib non-free
deb-src http://archive.debian.org/debian-security buster/updates main contrib non-free
deb-src http://archive.debian.org/debian/ buster-updates main contrib non-free

Run the update & upgrade process

Refresh the cache and apply the updates. Restart after this step completes.

sudo apt update
sudo apt full-upgrade

Upgrade from Debian 10 (buster) to Debian 11 (bullseye)

Update your source file: ‘/etc/apt/source.list’

deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free

deb-src http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

Run the update & upgrade process

Refresh the cache and apply the updates. Restart after this step completes.

sudo apt update
sudo apt full-upgrade

Upgrade from Debian 11 (bullseye) to Debian 12 (trixie)

Update your source file: ‘/etc/apt/source.list’

deb http://deb.debian.org/debian/ trixie main contrib non-free
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free
deb http://security.debian.org/debian-security trixie-security main contrib

deb-src http://deb.debian.org/debian/ trixie main contrib non-free
deb-src http://deb.debian.org/debian/ trixie-updates main contrib non-free
deb-src http://security.debian.org/debian-security trixie-security main contrib non-free

Run the update & upgrade process

Refresh the cache and apply the updates. Restart after this step completes.

sudo apt update
sudo apt full-upgrade

About the Author

Jim Lucas

Owner and proprietor of this establishment

Leave a Reply

Your email address will not be published. Required fields are marked *