How to upgrade from Stretch to Buster without flashing an image
If you want to update your system from Stretch to Buster without flashing an image this guide is right for you i.e. if you are using a RevPi Flat, Connect, Core or Compact device.
The procedure described here may cause your device to stop booting. Use with caution.
Preparation
Please make a backup of your data.
Please read the article completely and clarify open questions before you start.
Instruction
Update your current system
sudo apt update
sudo apt dist-upgrade -yEdit the following file and change all “stretch” to “buster”
sudo nano /etc/apt/sources.listOnce you have replaced all occurrences of “stretch” within the file you can save it by pressing CTRL + X then Y followed by ENTER.
Edit the following file and change all “stretch” to “buster”
sudo nano /etc/apt/sources.list.d/raspi.listOnce you have replaced all occurrences of “stretch” within the file you can save it by pressing CTRL + X then Y followed by ENTER.
Run this command to remove unnecessary packages and speed up the upgrade process
sudo apt-get remove apt-listchangesNow we can start the upgrade with the following command
sudo apt update
sudo apt dist-upgradeIf this question pops up you can confidently answer with no
There may be further questions due to changes in the configuration files. Here you can best confirm the preselection and press "Enter".
Exceptions confirm the rule. If this question comes up you can answer it with "Yes".
At the end we can remove unneeded packages with this command
sudo apt autoremove -yLast but not least we clear out the package cache. It automatically removes any package files that are no longer available for download and thus are largely useless.
sudo apt autocleanNow it is time to reboot into our new fresh Buster system.
sudo rebootUpdate PiCtory
Please follow the steps in this article:
PiCtory fix after upgrade from Stretch to Busterarchived
Verification
This way you can check that you have successfully updated to Buster:
pi@RevPi33114:~ $ grep -i buster /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
VERSION="10 (buster)"
VERSION_CODENAME=buster