Why you should upgrade your Stretch system now

If you run a system with an underlying Debian Stretch version, we recommend to upgrade it at least to Debian Buster now. Here is why.

Skip description and jump to update procedure: How can I upgrade now?

Debian release model

The Debian GNU/Linux operating system gets a major update every two years.
The latest stable version is Debian 11, codename Bullseye, released on August 14, 2021. With this release the previous version, Debian 10 codename Buster, became “oldstable” and received only security updates by the Debian Security team until summer 2022. In August 2022 the Debian LTS team took over with minimal security maintenance until 2024 (LTS: Long Term Support).
Debian 9 codename Stretch is the “oldoldstable” release, which was maintained by the Debian LTS team until Juli 2022, hence support ended completely now.

Release name1st releaseend of lifeend of life LTS
Debian 8 “Jessie”2015-04-252018-06-172020-06-30
Debian 9 “Stretch”2017-06-172020-07-062022-07-01
Debian 10 “Buster”2019-07-062022-09-222024-06-30
Debian 11 “Bullseye”2021-08-142024-08-142026-08-31
Debian 12 “Bookworm”2023-06-202026-06-102028-06-30
Debian 13 “Trixie”2025-08-09t.b.d.t.b.d.
Debian release schedule (details see DebianReleases, LTS)

Reasons to update

While Debian Stretch hence still receives minimal security updates, support issues with 3rd party software and non-security bugs are getting more and more. The stability of Debian is based on a major version freeze for all packages, to guarantee compatibility and stability of your current setup throughout APT package upgrades. The downside is that you won’t see new features, new standards, and new protocol support added with any package upgrade. Since Debian Stretch package major versions are at time of writing at least 4.5 years old, this has also a security impact, as no new cryptography and transfer protocols are supported.

Software developers cannot always support old libraries, frameworks, or runtime system versions, as this implies additional maintenance and end user support efforts, which means that with Debian Stretch you will also face an increasing number of manually installed or compiled software which you cannot update anymore. While there may be workarounds to install newer libraries, frameworks, or runtime systems manually, those often cause incompatibilities at other ends.

For DietPi this means that we need to add an increasing number of workarounds and backwards compatibility code to our scripts and images and disable more and more software for Stretch systems. The issues, bug reports, and end user support we need to handle for these systems is increasing notably. As a result, we plan to drop support for Debian Stretch with the first release in 2022, which will be DietPi v8.0. Existing Stretch systems will be automatically migrated to a dedicated update branch, which may receive critical security patches, but not further updates or bug fixes. We will however provide an easy to execute script to upgrade your system to Buster and migrate back to the stable DietPi release branch. You won’t need to flash a new DietPi image, though we recommend it as a cleaner solution.

How can I upgrade now?

When you find some spare hour, you can upgrade your Debian Stretch system to Debian Buster by following the steps provided below. This has been proven to be a very painless upgrade, with a very low chance of facing any issues.

If you find a spare day, we recommend to further upgrade to the current stable Debian Bullseye. Read our article about how to do that: https://dietpi.com/blog/?p=811

In any case, we guarantee to support you with any upgrade process when you open an issue at our GitHub repository: https://github.com/MichaIng/DietPi/issues

Upgrade from Debian Stretch to Debian Buster

If you are fine with flashing a new image, follow the brief instructions on our blog post to cover common migration steps.

If too much customisation has been done without having it well documented or scripted, an upgrade of the running system may be easier. Run the below commands step by step to perform the upgrade from Stretch to Buster in a first step. If you face any errors and are unsure how to resolve, please contact us via our community forum or GitHub issue to find help.

dietpi-backup 1
sed -i 's/stretch/buster/g' /etc/apt/sources.list{,.d/*.list}
sed -i '/ buster-backports /d' /etc/apt/sources.list
rm -f /etc/apt/sources.list.d/dietpi-php.list
rm -f /etc/apt/trusted.gpg.d/dietpi-php.gpg
rm -f /etc/apt/preferences.d/dietpi-{php,openssl,xrdp}
rm -f /etc/mysql/mariadb.conf.d/97-dietpi.cnf
/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update
apt upgrade
apt full-upgrade
apt autopurge
/boot/dietpi/func/dietpi-obtain_hw_model
. /boot/dietpi/func/dietpi-globals

If you have PHP installed, also run the following commands to prevent issues when installing additional PHP modules:

mapfile -t packages < <(dpkg --get-selections '*php*' | mawk '$2=="install" {print $1}')
dpkg -r --force-depends "${packages[@]}"
apt -y install "${packages[@]}"
unset -v packages

If dietpi-update migrated you to the dedicated Stretch update branch already, you can now migrate back to the stable master branch to apply DietPi updates to v8.0 and above:

G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=master' /boot/dietpi.txt
dietpi-update

If you have Python 3 installed, as of its upgrade from v3.5 to v3.7, it needs to be reinstalled and old modules can be removed for cleanup:

rm -Rf /usr/local/lib/python3.5 /usr/local/bin/pip3*
dietpi-software reinstall 130

You may need to reinstall other Python-based software titles as well and modules manually installed with the pip3 command. Your data and settings are preserved.

Check if everything is working fine, do a reboot and check again. If so, we recommend to continue directly upgrading further to the current stable Debian Bullseye release, following the instructions given in our blog post: https://dietpi.com/blog/?p=811#manual-upgrade

At last: How can I support DietPi?

If you find DietPi useful and if you benefit from using it, you can help us in a few ways: Contribute to DietPi

  • Support the DietPi developing group by joining us and
    • develop DietPi code
    • examine DietPi issues
    • support other users in our community forum
    • enhance or extend our documentation
    • promote DietPi in the Social Media
    • write articles to increase the publicity of DietPi
  • Support DietPi with a donation: PayPal, Patreon

Why you should upgrade your Stretch system now

Leave a Reply

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

Scroll to top