Key to success: less software installed on your system, the higher chance for a successful upgrade. The chances for a successful and fully functional upgrade are decreased by a number of 3rd-party packages installed on your current system. From this reason, remove any obsolete standard repository and 3rd-party software before you attempt the upgrade. The aptitude
command might help you to find any 3rd party software package currently installed on your Debian system.
# aptitude search '~i(!~ODebian)'
The above command will list all packages which are no longer in a standard repository list since they were removed; thus they were rendered obsolete, or the 3rd party packages which were installed manually.
Perform a full backup of data and manual configuration files residing on your current system. For example, these may include but not limited to user home directories, databases, websites, etc. In case you run Debian Linux virtually take a snapshot just in case something goes wrong during the Buster upgrade.
Buster Full Upgrade
Before we move on with the upgrade, let’s fully upgrade our current Debian Jessie system:
# apt-get update # apt-get upgrade # apt-get dist-upgrade
If everything went smoothly, perform database sanity and consistency checks for partially installed, missing and obsolete packages:
# dpkg -C
If no issues are reported, check what packages are held back:
# apt-mark showhold
Packages On Hold
will not be upgraded, which may cause inconsistencies after Buster upgrade. Before you move to the next part, it is recommended to fix all issues produced by both above commands. The following command might be of a further assistance:
# dpkg --audit
Update Package Repository to Debian Buster
Now, that we have a current system fully upgraded, it is time to re-synchronize the package index files with new Debian Buster sources. This is done by editing /etc/apt/sources.list
file to include Debian stretch
package repository. First, make a backup the current /etc/apt/sources.list
:
# cp /etc/apt/sources.list /etc/apt/sources.list_backup
Modify a current /etc/apt/sources.list
file to include stretch repositories or simply update keyword stretch
to buster
.I use a sed
command to automate this tedious task:
# sed -i 's/stretch/buster/g' /etc/apt/sources.list
Once the above /etc/apt/sources.list
file edit is completed, use apt
command to update packages index:
# apt update
Upgrade to Debian Buster Simulation
Before we hit the UPGRADE button, let’s use apt
command to see a preview of what we are facing. To do this execute apt list --upgradable
command in order to get a quick survey of the number of packages to be installed, updated and removed without affecting the system.
# apt list --upgradable
Upgrade to Debian Buster
We have come to the most exciting part, which is the actual Stretch upgrade to Debian Buster system. During the upgrade you may be asked:
# aptitude search '~i(!~ODebian)'
Restart services during package upgrades without asking?
The choice is about whether you wish the system to restart your services automatically during the system upgrade or you wish to do it manually or after the system is fully upgrade to Buster. When ready, execute the bellow commands to commence the Debian Buster upgrade process:
# apt-get upgrade # apt-get dist-upgrade
At this stage you should have your Stretch Debian Linux system fully upgraded to Debian Buster 10. Follow, this guide to check your current Debian version.
Once again check for obsolete packages so there are no surprises down the track:
# aptitude search '~i(!~ODebian)'
Congratulations to your fully upgraded Debian 10 Buster Linux system.
For this upgrade manual all credits go to: https://linuxconfig.org/how-to-upgrade-debian-9-stretch-to-debian-10-buster
Thank you very much for your manual. Very useful.