Update ALL existing installed packages
Before you upgrade your Debian version to 10, you must apply all security patches and pending upgrades to Debian 9 itself Hence, 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: