One of the tasks you might be trying to complete is upgrading Debian 9 to Debian 10. There are still several data centers that are only offering Debian 9 as an option. Below are the following commands to upgrade the Linux operating system.
1. Open ans SSH session to the server or command terminal.
2. Log into the server.
3. Use SU to become root if you are not already a root user.
(We are using root as the example user, this could be any user that has su permissions)
4. Update and upgrade all packages for Debian 9 Stretch. To do this run the the below two commands.
5. Reboot the system.
shutdown -r now
6. Open SSH session to the server or command terminal. Switch user to root by following step 3 again.
7. Update repo from Debian 9 Stretch to Debian 10 Buster
sed -i 's/stretch/buster/g' /etc/apt/sources.list
8. Update system to flush out the old ache and load the existing cache that was updated in step 7.
9. Upgrade Debian 9 Stretch to Debian 10 Buster.
10. During the upgrade process you will be asked if you are you want to restart services during the upgrade without asking. You can select YES so the upgrade can be completed.
Example of what the upgrade process looks like after selecting yes.
11. When the upgrade is complete run the following command to clean up anything that might have been missed during the first upgrade process.
12. Remove old packages to insure you have a clean system after the upgrade.
13. Reboot the system (otptional).
shutdown -r now
14. Check to insure the version is Debian 10 Buster. Open SSH terminal or terminal window and run the following command.