2 Ways to Upgrade Debian 9 Stretch to Debian 10 Buster (GUI & Terminal)

Debian 10, codenamed Buster, will be released on July 6, 2019. This tutorial is going to you 2 ways to upgrade Debian 9 to Debian 10. The first method uses the graphical Synaptic package manager and the second method uses command line. Usually you use Synaptic package manager to upgrade Debian desktop and use command line to upgrade Debian server, but the command-line method works for desktops too.

As with every Debian release, Debian 10 will be supported for 5 years. The codename “Buster” is named after Andy’s dog in the Toy Story movie.

debian 10 buster

Recommendation

If you installed the proprietary Nvidia driver on Debian 9 desktop, I recommend removing it before the upgrade because the Nvidia driver caused package conflict when I attempted to upgrade Debian stretch to buster.

sudo apt remove *nvidia*

Upgrade Debian 9 to Debian 10 with the Graphical Synaptic Update Manager

Open Synaptic package manager from applications menu. If your system doesn’t have Synaptic, you can install it by running the following command in terminal.

sudo apt install synaptic

In MATE desktop environment, Synaptic can be found by going to System -> Administration -> Synaptic Package Manager.  Then click the reload button to update package repository index.

upgrade debian 9 to debian 10 in synaptic

Next, click Mark All Upgrades button in the toolbar to update packages. Then click the Mark button in the dialog window.

upgrade debian 9 to 10 synaptic

Then click the Apply button in the toolbar. Click the Apply button in the Summary dialog window to install upgradable packages. (If a new kernel is installed during this step, then you need to reboot the system to in order to continue the upgrade process.)

upgrade debian stretch to buster synaptic

After that, we need to change the repository from Stretch to Buster. In Synaptic package manager, go to Settings -> Repositories. You will see a list of repositories. Find the repositories with debian.org in the URI. These are the repositories that come with every Debian installation. Select these repositories one by one and change the distribution from stretch to buster.

debian miminal upgrade

Then disable all other third party repositories by removing the check mark. Click the OK button and Reload the repository for the changes to take effect.

Next, we will do a minimal upgrade. Go to Settings -> Preferences. Change the system upgrade method from smart upgrade to default upgrade.

synaptic system upgrade method

  • Then click the Mark All Upgrades button in the toolbar. Click the Mark button in the dialog window.
  • Click the Apply button in the toolbar. Click the apply button in the dialog window.

During this step, you may be asked if you want to restart services automatically without asking, I selected Yes by ticking on the checkbox.

debian 10 full upgrade

Once the minimal upgrade is finished, we will do the full upgrade. Go to Settings -> Preferences. Change the system upgrade method back to smart upgrade.

  • Then click the Mark All Upgrades button in the toolbar. Click the Mark button in the dialog window.
  • Click the Apply button in the toolbar. Click the apply button in the dialog window.

Once the full upgrade is finished, reboot your system and check your Debian version with the following command.

lsb_release -a

You should see

debian 10 gnu linux

Congrates! You have successfully upgraded to Debian 10 Buster.

Upgrade Debian 9 Stretch to Debian 10 Buster Using Command Line

You can use command line to upgrade Debian desktop or a headless server. If you use SSH to log into your Debian server, it’s a good idea to keep your OpenSSH session alive by adding the following line in /etc/ssh/sshd_config file on your server.

ClientAliveInterval 60

Save and close the file. Then restart SSH daemon.

sudo systemctl restart ssh

To upgrade to Debian 10, switch to root user with the following command. You will need to enter the root user’s password.

su -

Then update existing software using the following two commands.

apt update

apt upgrade

If a new kernel is installed when running the above command, then you need to reboot the system to in order to continue the upgrade process. To reboot Debian, run the following command. (Remember to switch to root user again after the reboot.)

shutdown -r now

Next, we need to edit the sources.list file with a command line text editor such as Nano.

nano /etc/apt/sources.list

Change all instances of stretch to buster. If you don’t like changing it one by one, then you can exit out of Nano text editor (Press Ctrl+X) and run the following command for batch replacement.

sed -i 's/stretch/buster/g' /etc/apt/sources.list

Then we need to disable third-party repositories with the following command, which will add a # character at the beginning of line for every .list file in /etc/apt/sources.list.d/ directory.

sed -i 's/^/#/' /etc/apt/sources.list.d/*.list

Next, update software sources and upgrade software to the latest version available in the buster repository. This step is called minimal upgrade.

apt update

apt upgrade

If you see the following error,

The following packages have unmet dependencies:
 inetutils-ping : Conflicts: ping

Then you can uninstall inetutils-ping.

apt remove inetutils-ping

And run apt upgrade command again. If the apt-listchanges shows up during the upgrade, you can press the Q key to return to the main screen.

upgrade debian strech to debian buster

When upgrading packages, you will be asked if you want to restart services without asking. If you want to manually restart services, choose No. This tutorial choose Yes, because my Debian box doesn’t have a service that needs to be accessed by the public.

upgrade debian 9 to debian 10

You will also likely to be asked if you want to install new version of configuration files. I always choose No (Just press Enter) to be on the safe side. (The new configuration file will be saved with the same file name but with the .ucf-dist or .dpkg-dist extension, which you can examine after the upgrade.)

debian buster upgrade Installing new version of config file

Once minimal upgrade is finished, run the following command to begin full upgrade.

apt dist-upgrade

Now you can remove obsolete/unneeded software packages from your Debian system.

apt autoremove

apt clean

Finally, reboot the system.

shutdown -r now

Check your Debian version.

lsb_release -a

You should see the following text.

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Congrates! You have successfully upgraded to Debian 10 Buster.

Next Step

I hope this tutorial helped you upgrade Debian 9 to Debian 10. You can also attend a Debian release party to celebrate it! As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂

Rate this tutorial
[Total: 3 Average: 5]

report this ad

One Response to “2 Ways to Upgrade Debian 9 Stretch to Debian 10 Buster (GUI & Terminal)

  • Outstanding synopsis! Thank you and have a great week.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • If my answer helped you, please consider supporting this site. Thanks :)