Upgrade Raspbian from Stretch to Buster

Posted by

Debian 10, Buster, has been released recently and the Raspbian image is already available. It’s time to upgrade one of my Raspberries to test it.

Before starting the update, we will update the system and reboot it. We will also install screen to be able to recover the process in case of connection problem.

sudo -i
apt update && apt upgrade -y
apt install screen -y
reboot

Connect to the Raspberry and start screen as root

sudo -i
screen

Replace stretch by buster in the sources

find /etc/apt/sources.list* -type f | xargs sed -i 's/stretch/buster/g'

Update the sources and upgrade the packages

apt update
apt upgrade -y

If the network cuts, connect to the Raspberry and use the screen id to recover it.

sudo -i
screen -ls
screen -rd screen_id

After a long time, the upgrade is over and we can reboot it.

reboot

Check if the release has been installed.

#lsb_repleace -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster

I got some problems and I had to make some manual fixes.

apt purge netfilter-persistent iptables-persistent -y
apt install iptables-persistent -y

apt remove gcc-6 g++-6 -y
apt install curl nfs-common -y
apt upgrade -y

Now we clean and everything is finished, enjoy your updated system.

sudo -i
apt autoremove -y
apt clean
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs dpkg --purge

Leave a Reply

Your email address will not be published. Required fields are marked *