edan.uk
Posted on
Linux

Upgrading from Debian 10 to Debian 11: A Step-by-Step Guide

Author
Upgrading from Debian 10 to Debian 11: A Step-by-Step Guide

Debian, a widely used and community-driven Linux distribution, has released its latest stable version, Debian 11, codenamed Bullseye. This version comes packed with numerous enhancements and new features, making it a worthy upgrade from Debian 10, also known as Buster. The following instructions provide a comprehensive overview of the process to upgrade your Debian 10 system seamlessly to Debian 11.

Prerequisites for an Upgrade

Before beginning the upgrade, ensure you have the following:

  • A running Debian 10 installation.
  • Reliable internet connectivity.
  • A user account with administrative (root) access rights.

Preparing to Upgrade Debian 10 to Debian 11

Transitioning from Debian 10 to Debian 11 can be done with minimal disruption to users, although a system reboot is necessary to activate the new kernel post-upgrade. Prior to proceeding, creating a backup is strongly recommended to safeguard against potential data loss.

Step 1: Data Backup

Backing up your data is a crucial step before any major system upgrade. Consider using rsync for effective backups. If you prefer to selectively back up important items, here are the key directories and files worth considering:

  • Configuration directory: /etc
  • Package database: /var/lib/dpkg
  • APT extended states: /var/lib/apt/extended_states
  • Installed package selection: output of dpkg --get-selections "*"
  • Aptitude package states: /var/lib/aptitude/pkgstates if applicable.
  • User files: your home directory (/home) including hidden files to preserve application configurations.

Step 2: Update Current Packages

Updating existing packages is vital for a smooth upgrade process. Ensuring that there are no held packages will reduce the likelihood of complications during the upgrade.

Check for packages that are on hold:

sudo apt-mark showhold

If any packages are listed, unhold them using:

sudo apt-mark unhold [package_name]

Next, refresh the package list and upgrade all packages:

sudo apt update && sudo apt upgrade

Allow the command to finish executing before proceeding.

Step 3: Ensure Required Packages Are Present

The gcc-8-base package, integral for many systems, should be checked and installed if absent. Use the following command:

sudo apt install gcc-8-base

If the package is already installed, this command will have no effect.

Step 4: Modify the Sources List for Bullseye

The APT sources need updating to point to the Bullseye repositories. Open the sources list file:

sudo nano /etc/apt/sources.list

Comment out the existing Buster sources by adding a # at the beginning of each line and add the new Bullseye sources:

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
deb http://ftp.debian.org/debian bullseye-backports main contrib non-free

Save the file and exit your text editor.

Step 5: Update Repository Information

Now that your sources are pointing to Bullseye, refresh your package list to retrieve the latest repository information.

sudo apt update

Take note of how many packages are available for upgrade.

Step 6: Initiate the Upgrade Process

To perform the upgrade to Debian 11, execute:

sudo apt full-upgrade -y

When prompted about restarting services, choose Yes. This upgrade process may take some time based on your system’s resources and internet speed.

Step 7: Complete the Upgrade with a Reboot

Once the upgrade finishes, restart your system to finalize the update and enable the new kernel:

systemctl reboot

Upon rebooting, you will see the Debian 11 login screen.

Step 8: Verify the Upgrade

After logging in, confirm the successful upgrade by checking the Debian version:

cat /etc/debian_version

This should reflect the updated version, confirming that the system is now running Debian 11.

What’s New in Debian 11 Bullseye?

Debian 11 introduces a plethora of enhancements, including but not limited to:

  • Over 11,000 new packages, resulting in a total of nearly 60,000 available packages.
  • Upgraded desktop environments such as GNOME 3.38 and KDE Plasma 5.20.
  • The introduction of the exFAT filesystem support.
  • Improvements in usability and performance with better hardware compatibility and resource management.
  • Driverless printing and scanning support for various devices.

New productivity software and updated programming languages are part of the offering, making the upgrade not just a version change, but a significant enhancement for users.

Conclusion

Upgrading from Debian 10 to Debian 11 can enhance your system’s capabilities with new features and improvements. Following the outlined steps ensures a smooth transition, reducing the risk of issues during the upgrade process. After upgrading, users can explore the new functionalities and consider further enhancements to optimize their Debian experience.