Today I updated my Debian system on my working mashine form Stretch to Buster. This is just a short reminder for myself. I followed the blog form nixcraft here.
1. Check version
First check your current version and note if you need it for fixing problems later.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.12 (stretch)
Release: 9.12
Codename: stretch
$ uname -mrs
Linux 4.9.0-12-amd64 x86_64
2. Update installed packages
First bring your strech up to date by updating all your installed packages
$ sudo apt update
$ sudo apt upgrade
$ sudo apt full-upgrade
$ sudo apt --purge autoremove
3. Update /etc/apt/sources.list file
Now you can update your debian package source list from stretch to buster. First check your current versions:
$ cat /etc/apt/sources.list
Now you need to replace the strech references with buster. This can be done quickly with the sed command:
$ sudo cp -v /etc/apt/sources.list /root/
$ sudo cp -rv /etc/apt/sources.list.d/ /root/
$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*
You can verify our new list
$ cat /etc/apt/sources.list
Finally update you new package list
$ sudo apt update
4. Minimal system upgrade
In the next step you perform a minimal system update to avoid removing to much packages.
$ sudo apt upgrade
Answer question about restart of services wit ‘yes’
5. Upgrading Debain 9 to Debian 10
No you can run the real upgrade to Debain 10.
$ sudo apt full-upgrade
…this will take some time…
6. Reboot and Verification
Finally reboot your system…
$ sudo reboot
…and check the new version
$ uname -r
$ lsb_release -a
7. Clean up
Rund the autoremove command to get rid of old packages:
$ sudo apt --purge autoremove
Thats it! Have fun with fine tuning your new Debian Buster!