How To Upgrade Debian to a New Release

Check Debian Version on Debian website:
Check version on system:

$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye


$ sudo cat /etc/os-release

USERS SHOULD BACKUP ALL DATA before attempting a release upgrade – SEE

Only after the back – do the following:

Ensure your system is up-to-date in it’s current release.

$ sudo apt update
$ sudo apt upgrade

If you haven’t already, ensure all backups are up-to-date.

Make a backup of the /etc/apt/sources.list file:

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

In a text editor, replace the codename of your release with that of the next release in APT’s package sources
For instance, the line:

deb buster main

should be replaced with

deb bullseye main
$ sudo nano /etc/apt/sources.list 

# Clean and update package lists

$ sudo apt clean
$ sudo apt update

Perform the major release upgrade, removing packages if required

$ sudo apt full-upgrade

Remove packages that are not required anymore. Be sure to review this list: you may want to keep some of them

$ sudo apt autoremove

Reboot to make changes effective (optional, but recommended)

$ sudo shutdown -r now

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.