How to Upgrade Raspbian Stretch to Buster
Raspbian OS is the official OS for the Raspberry PI, following is a guideline that needs to be executed to update the OS from stretch to Buster which is the latest distro.
- Ensure to backup the SD card with image copy (win32Diskimage or dd)
Update all packages on the current Raspbian (stretch)
sudo apt update
sudo apt dist-upgrade -y
Preparing updates to Stretch
- Modify the file /etc/apt/sources.list and /etc/apt/sources.list.d/raspi.list
- change the word “stretch” to “buster” distribution
sudo nano /etc/apt/sources.list
sudo nano /etc/apt/sources.list.d/raspi.list
Download and Update the OS
Around 1.5GB of packages will be downloaded and might take some time for installation (est. 6-8hours)
Additional prompt will be required during installation to override default configuration
sudo apt update -y
sudo apt dist-upgrade
Cleaning Up
Once the Update is completed, remove some older packages that are not necessary
sudo apt autoremove -y
Reboot
The last step is to restart the Raspberry pi and checks if all services are correctly started after reboot
sudo restart