In this article we will discuss how to upgrade Debian 9 to 10. In this version improved support for UEFI boot, the system application isolation AppArrmor enabled by default, filtering of network packets based on nftables instead of iptables, you can print without drivers with CPUS 2.2.10, and adds support for the Allwinner A64 platform.
Please note that when upgrading there is always a risk to break the system. The most reliable way to get new version is to install it clean. If you do decide to upgrade, create a backup, and for production systems, better yet, view the official documentation.
How to upgrade Debian 9 to 10
1. Cleaning system
The first rule of safe updates – the less software installed on your system, the higher the chances that the upgrade goes smoothly. Third-party packages, and especially the PPA and other repositories greatly reduces the chances that the update will be without problems. Therefore, before you upgrade is better to remove all packages from the system.
You can find all the third party packages using aptitude utility:
sudo aptitude search '~i(!~ODebian)'
This command displays all packages that are no longer in the official repository because they have been removed, and the packages installed manually. Such packages it is desirable to remove.
2. Updating an existing system
The second rule in order to make a safe update, your system needs to be updated to the latest version. To do this, run:
sudo apt update
sudo apt dist-upgrade
If all went well, run the check database integrity:
Then check for any pending packets:
Deferred packages cannot be updated, they can become a problem when upgrading to Debian 10. Before you go ahead fix all the problems, this command can help you:
3. Configuring repositories
Now our system is completely updated and ready to move to the new version and here is the answer to the question how to upgrade debian debian 9 to 10. For this you need to edit the file /etc/apt/sources.list and to change all repositories to stretch buster. First, back up the existing file:
cp /etc/apt/sources.list /etc/apt/sources.list_backup
Then open the file for editing with vim or apt edit sources and replace all occurrences of the word stretch on buster:
deb http://httpredir.debian.org/debian stretch main
deb http://httpredir.debian.org/debian Jessie-updates main
deb http://security.debian.org Jessie/updates main
deb http://httpredir.debian.org/debian buster main
deb http://httpredir.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main
Instead of manual editing, you can use the sed command, but it is better to do this manually:
sed -i 's/stretch/buster/g' /etc/apt/sources.list
Then save the changes if you used the editor and update the repository list:
With the following command you can see list of packages to upgrade:
apt list --upgradable
4. Upgrade to Debian 10
All steps are complete and we are left with the last – update Debian 9 to 10. To do this, run the command:
During upgrade, installer may ask permission to restart several system services. It will stop the installation process and in order to continue you have to agree. The update will take some time depending on your Internet speed and processor performance. Now you know how to upgrade to Debian 10.
5. A test version of the system
After the update is complete, restart the computer. Here you can check how all successfully passed with the command:
Here you should see that you have the tenth version of the system.
Today we discussed how to upgrade to debian 10, as you can see, the procedure is fairly simple, although it may cause problems when used carelessly. Again I remind you that before doing anything it is better to create backup of important files.