ยง2023-07-22

$ sudo apt update && sudo apt -y upgrade  && sudo apt --purge autoremove
  1. modify /etc/apt/sources.list as
    • # cp -v /etc/apt/sources.list /etc/apt/sources.list.ori
    • replace every bullseye with bookworm
    • # sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
    • the modified /etc/apt/sources.list is as follows:
# deb http://deb.debian.org/debian/ bookworm main

deb http://deb.debian.org/debian/ bookworm main
deb-src http://deb.debian.org/debian/ bookworm main

deb http://security.debian.org/debian-security bookworm-security main
deb-src http://security.debian.org/debian-security bookworm-security main

# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main
deb-src http://deb.debian.org/debian/ bookworm-updates main
  1. sudo apt update
$ sudo apt update
Hit:1 http://ppa.linuxfactory.or.kr bullseye InRelease                                                                     
Get:2 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://deb.debian.org/debian bookworm InRelease [147 kB]
Get:4 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]                                                                                                                                                                                                           
Get:5 http://security.debian.org/debian-security bookworm-security/main Sources [32.5 kB]                                                                                                                                                                                         
Get:6 http://deb.debian.org/debian bookworm/main Sources [9,628 kB]                                                                                                                                                                                                               
Get:7 http://security.debian.org/debian-security bookworm-security/main arm64 Packages [47.8 kB]                                                                                                                                                                                  
Get:8 http://security.debian.org/debian-security bookworm-security/main Translation-en [26.4 kB]                                                                                                                                                                                  
Get:9 http://deb.debian.org/debian bookworm/main arm64 Packages [8,802 kB]                                                                                                                                                                                                        
Get:10 http://deb.debian.org/debian bookworm/main Translation-en [6,076 kB]                                                                                                                                                                                                       
Get:11 http://deb.debian.org/debian bookworm-updates/main Sources [1,476 B]                                                                                                                                                                                                       
Get:12 http://deb.debian.org/debian bookworm-updates/main arm64 Packages [4,736 B]                                                                                                                                                                                                
Get:13 http://deb.debian.org/debian bookworm-updates/main Translation-en [3,528 B]                                                                                                                                                                                                
Fetched 24.9 MB in 25s (1,007 kB/s)                                                                                                                                                                                                                                               
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1111 packages can be upgraded. Run 'apt list --upgradable' to see them.
  1. sudo apt upgrade --without-new-pkgs -y

  2. Perform a Full System Upgrade

$ sudo apt full-upgrade -y
$ sudo reboot now or `/sbin/reboot now`

Donot edit /boot/boot.scr, or else will not be able to boot.

  1. Check
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ lsb_release -d
No LSB modules are available.
Description:    Debian GNU/Linux 12 (bookworm)

$ uname -a
Linux hc4Bullseye 6.2.0-odroid-arm64 #1 SMP PREEMPT Tue, 02 May 2023 19:44:38 +0000 aarch64 GNU/Linux
alexlai@hc4Bullseye:~$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

alexlai@hc4Bullseye:~$ python3  --version
Python 3.11.2
  1. Clear unwanted
$ sudo apt --purge autoremove -y