Outline
- Backup your system. Typically I create a snapshot.
- Update existing packages and reboot the Debian 9.x system.
- Edit the file
/etc/apt/sources.list
using a text editor and replace each instance ofstretch
withbuster
. - Update the packages index on Debian Linux, run:
sudo apt update
- Prepare for the operating system upgrade, run:
sudo apt upgrade
- Finally, update Debian 9 to Debian 10 buster by running:
sudo apt full-upgrade
- Reboot the Linux system so that you can boot into Debian 10 Buster
- Verify that everything is working correctly.
Source: cyberciti.biz
Step 2. Update installed packages
Type the following apt command or apt-get command:
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt --purge autoremove
or
sudo apt-get update
sudo apt-get upgrade
sudo apt-get full-upgrade
sudo apt-get --purge autoremove
Reboot the Debian 9.x stretch to apply the kernel and other updates: sudo reboot
Step 3. Update /etc/apt/sources.list
file
sudo cp -v /etc/apt/sources.list /tmp/
sudo cp -rv /etc/apt/sources.list.d/ /tmp/
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*
### see updated file now ###
cat /etc/apt/sources.list
sudo apt update
Step 4. Minimal system upgrade
A two-part process is necessary to avoid the removal of large numbers of packages that you want to keep. Therefore, first run the following:
sudo apt upgrade
Just follow on-screen instructions. During the upgrade process, you may get various questions, like “Do you want to restart the service?” OR “keep or erase config options” and so on. For example, I got a screen as follows indicating new changes.
Press ‘q’ to exit and further you may see additional screens.
Step 5. Upgrading Debian 9 to Debian 10
In addition, minimum upgrades we need to do full upgrades to finish the whole Debian 9 to Debian 10 update process. This is the main part of the upgrade. In other words, execute the following command to perform a complete upgrade of the system, installing the newest available versions of all packages, and resolving all possible dependency:
sudo apt full-upgrade
sudo reboot
Step 6. Verification
It is time to confirm the upgrade. Run:
uname -r
lsb_release -a
Finally, clean up outdated packages using the apt command/apt-get command:
sudo apt --purge autoremove
And there you have it. We have successfully upgraded to Debian Linux 10. Debian project also posted an in-depth guide here that explains other issues one might face during installation.