1. Buster upgrade
  2. Procedure
  3. Notable changes
  4. Issues
  5. References

Yet again, this time has come. I usually upgrade at least one machine to testing during its development cycle, and now I need to do this on my workstation to get a working npm package which was removed from testing/stretch, because it was outdated, in 2017. Maintenance of the Debian package has now resumed and a fresh new version landed in unstable in August 2018 which looks promising, so here we go.


  1. Pre-upgrade backups and preperation:

    sudo apt install ttyrec screen
    sudo ttyrec -e screen /var/log/upgrade-buster.ttyrec
    cd /etc; git tag pre-buster
    git gc --prune # make /etc smaller for backup
    umask 0077
    tar cfz /var/backups/pre-buster-backup.tgz /etc /var/lib/dpkg /var/lib/apt/extended_states /var/lib/aptitude/pkgstates /var/cache/debconf
    dpkg --get-selections "*" > /var/backups/dpkg-selections-pre-buster.txt
    debconf-get-selections > /var/backups/debconf-selections-pre-buster.txt
    # the above (and more) are performed automatically by the `sys` handler in backupninja
    apt-mark showhold
    dpkg --audit
    dpkg -l '*dkms' # look for dkms packages and make sure they are relevant, if not, purge.
  2. Perform any pending upgrade and clear out old pins:

    rm /etc/apt/preferences /etc/apt/preferences.d/* #  Check for pinned (on hold) packages, and possibly disable
    rm /etc/apt/sources.list.d/testing.list # or other similar backports or sources from later releases
    rm /etc/apt/sources.list.d/stretch-backports.list
    apt update && apt -y upgrade
    dpkg -l 'linux-image-*' # list kernel images and purge unused packages
    # look for packages from backports, other suites or archives
    # if possible, switch to official packages by disabling
    # third-party repositories
    apt install apt-show-versions
    apt-show-versions | grep -v /stretch | grep -v 'not installed$'
  3. Check free space, see this guide to free up space and download packages:

    sed -i.orig 's/stretch/buster/g' /etc/apt/sources.list
    apt update; apt -o APT::Get::Trivial-Only=true dist-upgrade; df -h
    apt -y -d upgrade && apt -y -d dist-upgrade
  4. Actual upgrade run:

    apt dist-upgrade -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'
  5. Post-upgrade checks:

    apt install deborphan
    apt purge $(deborphan -n) # look also for obsolete packages in aptitude
    dpkg -l '*-dbg' # look for dbg package and possible replace with -dbgsym
    aptitude purge ~c # purge removed packages
    apt autoremove -y --purge
    apt clean
    # review and purge older kernel once the new one boots properly
    dpkg -l 'linux-image*'
    # review packages that are not in the new distribution
    aptitude search '?narrow(?not(?archive("^[^n][^o][^w].*$")),?version(CURRENT))'

The last incantation comes from the cross-upgrade documentation. It selects packages that are currently installed (?narrow(...,?version(CURRENT))) from an archive other than "now" (?not(?archive("^[^n][^o][^w].*$")). This was cargo-culted from Ewan's cross-upgrading documentation. Another way to do this is with apt-show-version:

apt-show-versions | grep -v /buster

... although that yields strange results like:

linux-libc-dev:i386 not installed

Those are presumably harmless, so this might be a better call:

apt-show-versions | grep -v /buster | grep -v 'not installed$'

Notable changes

Here are some packages with notable version changes that I noticed. This will change during the Buster cycle, naturally.

Package Stretch Buster Notes
Emacs 24.5 25.2
Firefox 52 60 Major upgrade, the "Quantum" release
GNOME 3.22 3.28
Docker N/A 18 Finally, Docker is back in Debian?





Note: the official upgrade guide and release notes not available at the time of writing (2018-08-22) as the documentation is usually written during the freeze and buster is not there yet.

Created . Edited .