
The Debian announced the new stable version Debian 10 released on July 6th, 2019. It’s code name is Buster and it will be supported for 5 years. This release is with full of new features and packages. Debian 10 buster ships with Linux 4.19 LTS kernel. In this release, GNOME defaults to using the Wayland display server instead of Xorg. However, the Xorg display server still installed by default. In this tutorial, we will show you how to upgrade Debian 9 Stretch to Debian 10 Buster.
Prerequisites
Before start the upgrade operation, you must have logged in as a root or a user with sudo privileges.
Backup Your Data
At first, you should make sure that you have taken the backup of your data before starting the upgrade process. This is the most import step because after upgrade you can’t revert it back. For example, Your MariaDb will be upgraded to version 10.3 and you can’t revert it. You should backup following:
- Databases
- Configuration files
- Application Codebases
- Email Accounts
- User Account Details
Upgrade Current Installed Packages
It’s recommended that, before starting the upgrade to Debian 10, you should update all currently installed packages to latest version. Use the below command to update the packages:
sudo apt update && apt upgrade
Update sources.list File
Now you have to reconfigure APT’s source-list
files. To do that edit the apt configuration file /etc/apt/sources.list
and replace all stretch
with buster
. If you have other source-list files under /etc/apt/sources.list.d
you must update those sources too. Execute the following sed
commands which will update stretch to buster in all source-list files:
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*.list
sudo nano /etc/apt/sources.list
The /etc/apt/sources.list
file will look like below.
deb http://deb.debian.org/debian buster main deb http://deb.debian.org/debian buster-updates main deb http://security.debian.org/debian-security buster/updates main
Upgrade to Debian 10 Buster
Once the replace done in configuration file, Update packages on your system again. After that proceed to update distribution.
sudo apt update && apt upgrade
You will be asked whether you want the services to be automatically restarted during the upgrade.
Restart services during package upgrades without asking?
During the upgrade process, you may also be asked various other questions, like whether you want to keep an existing configuration file or to install the package maintainer’s version. If you didn’t make any custom changes to the file it should be safe to type Y
otherwise to keep the current configuration enter N
.
Next, I would recommended to execute apt full-upgrade
which will do a complete upgrade of the system and install the newest version of packages.
sudo apt full-upgrade
Once done clean up the unnecessary packages with:
sudo apt autoremove
At last, you should reboot your system to activate the new kernel using below command:
sudo systemctl reboot
Now, Your system got upgraded to Debian 10. For the confirmation it would be better to check once again by executing dist-upgrade
command as given below:
sudo apt dist-upgrade
Verify the Upgrade
You can check the Debian Version using below command:
lsb_release -a
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster
Congratulations, you can now enjoy your new Debian 10 Buster.
Conclusion
You successfully learned how to upgrade Debian 9 Stretch to Debian 10 Buster. It is very straightforward and hope you did it easily.
If you got any error then you can visit the Upgrades from Debian 9 (stretch) page which covers the known issues that might happen during an upgrade to Debian 10 Buster.
Leave a Reply