DietPi – How to upgrade to “Bullseye”


Debian 11 (aka Debian Bullseye) has been released on August 14, 2021:

While DietPi started to ship new Bullseye-based images, this description gives the how to upgrade a system to Debian Bullseye and why you should do it.

Debian 11 logo
Debian 11 (Bullseye) logo

1. Why upgrading?

Debian’s stability is based on the fact that stable releases do not receive software package upgrades, aside of hand selected security patches and bug fixes. The downside is that package versions of a stable release are up to two years old. To benefit from newest features, design and standards, switching to the new Debian release is hence recommended. With Debian Bullseye, more than 70% of all software packages were updated to a new version. Some notable software version bumps between Debian 10 Buster and Debian Bullseye are:

The updated FOSS Mesa drivers are interesting for many single-board computer users, which use a desktop or other GUI, gaming or video software, as OpenGL ES and further general GPU acceleration for many popular SoC GPUs has been added or enhanced, like for Rockchip RK3399, RK3328, Allwinner H5 and others.

Native PC (x86_64) and virtual machine systems will benefit from an upgraded Linux kernel. Debian Buster shipped Linux 4.19, Debian Bullseye ships Linux 5.10, which includes native WireGuard, native exFAT support and many other filesystem and performance enhancements as well as new encryption and security standards.

Another interesting point is the option of driverless printing/scanning via the standardized IPP-over-USB protocol (printing) resp. SANE printing backend (scanning). Driverless means that you can get rid of non open source vendor specific printer/scanner driver which often were needed to be installed. In addition, the kernel support contains the option to use such a device over the network (e.g. see there).

Under the hood, the security of the password handling was improved (password hashing via yescrypt). This brings a better security resp. robustness against wordlist based attacks.

Due to the Debian roadmap regular Buster support will be stopped at 2022, Bullseye support is planned to be kept alive until 2024, with a limited support by the Debian LTS team until 2026.
Therefore it is reasonable to switchover to Bullseye within the next months to be up-to-date to ensure best software support.

VersionNameStatusRelease dateSupport end date
9StretcholdoldstableJune 20172020
10BusteroldstableJuly 20192022
11BullseyestableAugust 20212024
Roadmap of Debian (LTS: Long term support, i.e. security patches and updates)

2. How to upgrade

There are two options to come to a Bullseye based DietPi system:

  1. Starting a fresh install using our new Bullseye images
  2. Manual upgrade of a running DietPi system

Generally we recommend to start with a fresh image, note down and migrate only individual data, configuration and setup steps, to prevent obsolete or incompatible left overs from the old system. But in some cases, if too much customisation has been done without having it well documented or scripted, an upgrade of the running system may be easier. Just note that such an upgrade can always fail at some point, in the worst case (none reported yet!) making your system unusable.

2.1 Fresh install with DietPi Bullseye images

We introduced DietPi images based on Bullseye for a couple of systems (e.g. Raspberry Pi, native PC), which will be expanded to all DietPi supported hardware step by step, so that we exchange the today’s images containing Buster to ones containing Bullseye.

You can find out which image is based on Bullseye resp. Buster by going to the DietPi image download page. Then hover with your mouse over the download link of an image and examine the link name of it. The link name then contains “Buster” or “Bullseye”.

Raspberry Pi image download section
Download links: Move mouse over links for filename information

You may also go to the DietPi images directory where you see all image files. Then just download the new image and install it, following our DietPi installation procedure.

We highly recommend to keep the old system SD card/drive for a while and flash Bullseye to a new one. So in case something does not work as expected on the new system, you can revert, and to be able to copy over potentially missing data or configurations any time later. If you have installed MariaDB, do an additional database dump, which can be imported on the new system, if the automatic migration of the raw table files in /mnt/dietpi_userdata/mysql fails for some reason:

mysqldump --all-databases > mariadb.sql
# To import on the new system after installing MariaDB and if automatic database migration fails:
mariadb < mariadb.sql

A common way to migrate configuration and data from the old DietPi image is to copy over the content of /mnt/dietpi_userdata and /var/www as a whole before doing any software install, and in case selected files or directories from within /var/lib after software installs. Apply individual configuration changes where necessary from config files in /etc, /root or /home.

2.2 Manual upgrade

First of all, assure that you are currently running Debian Buster, e.g. by running
echo $G_DISTRO_NAME, which should return buster. If you are running Debian Stretch, please use the following instructions in your documentation, to upgrade to Buster first:

The manual upgrade needs the following steps:

  1. Backup the system
  2. Change the package sources (APT sources) to Bullseye
  3. Upgrade the system
  4. Software migrations
  5. Reboot to load all parts of Bullseye

In the following, commands for update actions are given. Depending whether you operate as root or not, you possibly have to add a sudo in advance.

2.2.1 Backup the system

Please always do a full system backup before touching a running Linux system in such an intrusive way. On DietPi you may simply use:

dietpi-backup 1

2.2.2 ChangE the package sources

The package sources are defined in /etc/apt/sources.list resp. *.list files within the directory /etc/apt/sources.list.d. The following commands will update all of them to pull the Debian Bullseye package lists from now on, and additionally will remove some now obsolete lists and preferences, dietpi-software installs on older Debian versions:

sed -i 's/buster/bullseye/g' /etc/apt/sources.list{,.d/*.list}
sed -i 's|bullseye/updates|bullseye-security|' /etc/apt/sources.list
rm -f /etc/apt/sources.list.d/dietpi-{php,wireguard}.list
rm -f /etc/apt/trusted.gpg.d/dietpi-php.gpg
rm -f /etc/apt/preferences.d/dietpi-{php,openssl,xrdp,wireguard}
rm -f /etc/apt/sources.list.d/pivpn-bullseye.list
rm -f /etc/apt/preferences.d/pivpn-limit-bullseye

2.2.3 Upgrade the system

As a next step, you need to pull the new APT package lists using the command:

apt update

This should give you a message that more than 250 software packages can be upgraded.

Depending on 3rd party software you installed, some lists may not yet be available for Bullseye, in which case the above command throws related errors. If so, edit the related file in /etc/apt/sources.list.d and revert the code name back from “bullseye” to “buster” and repeat the command above. As time of writing, the following repositories are known to not support Bullseye yet:

There may be some software config changes required to prevent upgrade errors in the first place. The below code can be copy&pasted into the console to apply some known required changes when related config files are present:

[[ -f '/etc/proftpd/proftpd.conf' ]] &&
! grep -q 'IfModule mod_ident.c' /etc/proftpd/proftpd.conf &&
sed -i '/IdentLookups/c\<IfModule mod_ident.c>\
IdentLookups off\n</IfModule>' /etc/proftpd/proftpd.conf

With updated package lists, the actual software package upgrades are done via below commands. Please assure that no errors happen and do not reboot before all upgrades have finished successfully. 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-services stop
apt upgrade
apt full-upgrade
. /boot/dietpi/func/dietpi-globals

2.2.4 Software migrations

Depending on installed software titles, as a distribution upgrade includes breaking changes, some configurations may need to be updated. When installed via dietpi-software, a reinstall is often the easiest way to have those applied automatically:

  • As the PHP base version has been upgraded from 7.3 to 7.4, old packages need to be purged, webservers re-configured and in case option PHP modules installed. If you did any manual PHP configuration changes, remember or backup them from /etc/php/7.3. We highly recommend to not backup whole config files, but note down the individual changes/additions you did, as the other content of old configs may be incompatible or deprecated with PHP 7.4.
  • If you use Pi-hole, you should prevent lsof from being auto-removed:
    apt-mark manual lsof
  • The following commands will purge PHP 7.3, install required but potentially auto-removed packages and reinstall all currently installed dietpi-software options (including PHP 7.4, if PHP was installed before), which are known to require configuration changes, done as part of the reinstall. So these steps should be always performed on a DietPi system, upgraded to Bullseye:
dietpi-services stop
command -v a2dismod > /dev/null && a2dismod php7.3
G_AGP '*php7.3*'
rm -Rf /etc/php/7.3
apt install fdisk systemd-timesyncd
dietpi-software reinstall 38 40 47 48 56 83 84 85 88 89 93 114 143

2.2.5 Reboot to Bullseye

Reboot your system with:


When the system has rebooted, you may check your version with:

cat /etc/os-release

If Bullseye is running, it typically gives:

root@dietpi:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION="11 (bullseye)"

Finally, you can purge unused packages with:

apt autopurge

Now you’re finished with your successful Bullseye update. Congratulations!

3. Known incompatibilities

There are a couple of known incompatibilities. We list them below and try to keep this list up to date so that you can re-check your software later on.

If you want to use these software packages, you should wait with the transition to Bullseye until the software packages are made compatible:

  • MotionEye (due to being Python 2 only)
  • CouchPotato (due to being Python 2 only)
  • Firefox Sync Server (due to being Python 2 only)
  • Telephone system 3cx (see here)

4. Feedback

If you faced error messages or a failure during the described upgrade process, please open an issue on GitHub DietPi issues or a topic in our DietPi forum.
If had any issues to understand or follow this guide, or missing some details, please let us know via a comment below.”

5. Conclusion

In short words: Upgrading your system to Bullseye gets you fit for the DietPi future.

About the author


DietPi image creator and documentation contributor.


  • Stephan,

    This is a great post – so clear and easy to follow ! I will upgrade soon my Raspberry PIs.

  • Great tut. I have a problem, can’t access Pi-hole web page, using nginx. Any help is welcome πŸ™‚

  • Thank you StephanStS, all done and all working. Though I’ve only got Pi-hole (with DHCP server), openVPN, RPI Monitor.

  • Upgraded my dietpi-Pihole with no issue!! Thanks!
    Just a minor observation: at the end of step 2.2.4 I reinstalled only the software I have. i.e.
    get the nubers with a quick “dietpi-software list | grep =2”
    and use the output to build your list for “dietpi-software reinstall”

    • There is no issue to try to reinstall all software title. If not being installed, they simple will be skipped.

  • Simple and easy to follow instructions. I encountered no issues upgrading and reinstalling PiHole

  • Upgrade went mostly without a hitch, I only had small issues with redis-server (needed to remove the dump.rdb/ before the service would run) and lightttpd (needing to reinstall mod-deflate and mod-openssl before it would run). Apart from that, pihole works fine, motioneye does not (of course, pity though as my camera just started working again on the kernel recently lol). Nothing else seems out of order, though my setup is quite minimal. Running lxde, kodi, pihole/unbound, vaultwarden, nextcloud, tor hotspot, vscodium. If anything pops up I’ll post on git /issues/. Using my rpi4B 8GB.

    PRETTY_NAME=”Debian GNU/Linux 11 (bullseye)”
    NAME=”Debian GNU/Linux”
    VERSION=”11 (bullseye)”

    • Many thanks for your feedback. Interesting issue with Redis, I’ll try to replicate, and in case add a prober step to the commands in this article. The Lighttpd and Pi-hole dietpi-software reinstall, being part of the commands, should handle the module install(s). But if you installed Pi-hole via the official installer, then indeed this needs to be done manually instead. With next Pi-hole release, deflate won’t be required anymore.

      • I think the redis issue was most probably something on my end so I don’t think anyone will run into it.
        Many thanks for your work!
        ps – good to know deflate won’t be needed next time πŸ™‚

  • Thanks. Just checked this out with one of my older Raspberry system, and I’m glad to report it is working. Took some time though.

    one down, three more to go.

  • How do I fix this?

    275 packages can be upgraded. Run ‘apt list –upgradable’ to see them.
    N: Skipping acquire of configured file ‘main/binary-arm64/Packages’ as repository ‘ buster InRelease’ doesn’t support architecture ‘arm64’

  • Upgraded my Dietpi to Bullseye. Use the same memory for my movie collection. This will of course also be deleted. Is there a way to keep the movie folder?

    • All your personal data and also changed configuration files will all be preserved when you do the manual upgrade. Its only the APT packages (the OS and software commands, libraries etc) which are upgraded in place without touching any other files.

      • Thank you for your reply. I decided to do a reinstallation. Now I have the problem that my Fritzbox does not show any Ip? With Lanscan I have already tried it unfortunately unsuccessfully. Do you have any idea what this can be?

        Rasperri 4
        I installed the software with Balena.
        Armv6, Armv7, Armv8 already tried.
        Fritzbox 7590 with mesh.

  • I am on step 2.2.3. When I click on apt update, non of the packages are due for an upgrade. Am I doing something wrong? I tried restarting the system twice.

    apt update
    Hit:1 bullseye InRelease
    Hit:2 bullseye InRelease
    Hit:3 public InRelease
    Ign:4 sarge InRelease
    Hit:5 buster InRelease
    Hit:6 bullseye InRelease
    Hit:7 sarge Release
    Hit:9 raspbianbuster InRelease
    Hit:8 focal InRelease
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    All packages are up to date.

    • Then your system seem to be on Bullseye already. Check via cat /etc/os-release to be sure. If not, please open an issue at GitHub or on our forum, where we’ll be able to investigate and resolve the issue.

      • cat /etc/os-release
        PRETTY_NAME=”Raspbian GNU/Linux 10 (buster)”
        NAME=”Raspbian GNU/Linux”
        VERSION=”10 (buster)”

        • Did you do also the rest of the commands given in 2.2.3 (e.g. apt upgrade,…) up to 2.2.5 with the final reboot?

About Author


DietPi image creator and documentation contributor.

DietPi Blog

DietPi is an extremely lightweight Debian-based OS, optimised for minimal resource usage, ensuring your SBC runs at its maximum potential!