Debian Jessie to Stretch update notes

# see:

# check installed architecture first
# dpkg --print-architecture
# if not amd64, consider new installation with amd64

dpkg-reconfigure debconf

dpkg --get-selections | fgrep hold
dpkg --audit
deborphan --list-keep
deborphan --guess-all
apt-get --purge autoremove
apt-show-versions | fgrep -v uptodate
find /etc -name '*.dpkg*' -o -name '*.ucf*'

mkdir ~/jessie
dpkg --get-selections > ~/jessie/dpkg-get-selections
rsync -a /etc/ ~/jessie/etc
rsync -a /var/lib/dpkg/info/ ~/jessie/var-lib-dpkg-info
rsync -a /var/lib/apt/extended_states ~/jessie/var-lib-apt-extended_states
deborphan --guess-all > ~/jessie/deborphan
deborphan --list-keep > ~/jessie/deborphan-keep

cd /etc/apt/sources.list.d
rm -f 03backports.list
mv 00jessie.list 00debian.list
mv 01jessie-updates.list 01debian-updates.list
mv 02jessie-unikl.list 02debian-unikl.list
sed -i 's/jessie/stretch/g' *.list
cd /etc/apt/preferences.d
rm -f 02jessie-unikl.pref 02stretch-unikl.pref

apt-get clean
apt-get update
apt-get install unikl-debian-archive-keyring
apt-get update

apt-get dist-upgrade

systemctl daemon-reexec # when upgrade hangs at "setting up udev" for example

apt-get --purge autoremove
apt-get --purge remove gcc-4.9-base:amd64
apt-get --purge remove $(deborphan --guess-all)
<delete unused packages ... run multiple times>

apt-show-versions | fgrep -v uptodate
<remove packages that have been removed from the _official_ archives,
 but keep old kernel until sucessful reboot>

cd /etc
find /etc -name '*.dpkg*' -o -name '*.ucf*'
<merge / remove / ...>

reboot # verify kernel boot order first
apt-get --purge remove linux-image-3.16.0-4-amd64 linux-image-3.16.0-5-amd64
debian_upgrade.txt · Last modified: 2018/02/20 13:32 by massar