How to upgrade Debian 9 to Debian 10 Buster using the CLI

ww‮‬w.lautturi.com
How to upgrade Debian 9 to Debian 10 Buster using the CLI

To upgrade a Debian 9 (Stretch) system to Debian 10 (Buster) using the command line interface (CLI), you can use the apt-get package manager and the do-release-upgrade command.

It is important to note that upgrading a system from one major release to another (e.g., from Debian 9 to Debian 10) can be a risky process, and it is important to follow the instructions carefully to avoid causing any damage to your system. It is also a good idea to back up your important data before proceeding with the upgrade.

Here are the steps to upgrade a Debian 9 system to Debian 10 using the CLI:

  1. Open a terminal window and log in to the system as the root user.

  2. Run the following command to update the package manager's list of available packages:

apt-get update
  1. Run the following command to upgrade all of the installed packages to the latest available versions:
apt-get upgrade
  1. Run the following command to install the update-manager-core package, which is required for the release upgrade process:
apt-get install update-manager-core
  1. Edit the /etc/apt/apt.conf.d/50unattended-upgrades file and change the Unattended-Upgrade::Allowed-Origins line to the following:
Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}-security";
};

This will allow the release upgrade process to install packages from the security repository.

  1. Run the following command to start the release upgrade process:
do-release-upgrade

This command will start the release upgrade process and guide you through the steps to upgrade your system to Debian 10. Follow the prompts to complete the upgrade process.

Once the upgrade process is complete, you will need to reboot the system in order for the changes to take effect. To reboot the system, run the following command:

reboot

For more information about upgrading a Debian system from one major release to another, you can consult the documentation for do-release-upgrade or visit the Debian website.

Created Time:2017-10-29 22:08:39  Author:lautturi