Unable to update DietPi from v10.3.3 to v10.5.2

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=10
    G_DIETPI_VERSION_SUB=3
    G_DIETPI_VERSION_RC=3
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘applied’
    G_LIVE_PATCH_STATUS[1]=‘applied’
    G_LIVE_PATCH_STATUS[2]=‘applied’
  • Distro version | trixie 0
  • Kernel version | Linux DietPi 6.12.75+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 3 Model B+ (aarch64)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | ( SanDisk ultra)

Additional Information (if applicable)

  • Software title | (unbound, adguard,openssh )
  • Was the software title installed freshly or updated/migrated? updated/migrated
  • Can this issue be replicated on a fresh installation of DietPi? No
  • Bug report ID | 173d7e1e-36e7-49dd-9806-639553f58cdf

Steps to reproduce

dietpi-upgrade

Expected behaviour

upgrade success

Actual behaviour

[FAILED] DietPi-Update | APT upgrade

  • Command: apt-get -y --with-new-pkgs upgrade

Extra details

[ INFO ] DietPi-Update | APT upgrade, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages were automatically installed and are no longer required:
  libpython3.13 linux-image-6.12.75+rpt-rpi-v8
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  linux-base-6.18.34+rpt-rpi-v8 linux-base-rpi-v8
  linux-image-6.18.34+rpt-rpi-v8
The following packages will be upgraded:
  7zip apache2-utils base-files bash bind9-dnsutils bind9-host bind9-libs curl
  e2fsprogs firmware-atheros firmware-brcm80211 firmware-iwlwifi
  firmware-mediatek firmware-realtek gpg gpgconf initramfs-tools
  initramfs-tools-bin initramfs-tools-core libc-bin libc-l10n libc6 libcap2
  libcap2-bin libcom-err2 libcurl3t64-gnutls libcurl4t64 libext2fs2t64
  libgcrypt20 libgnutls30t64 libgpiolib0 libgssapi-krb5-2 libk5crypto3
  libkrb5-3 libkrb5support0 liblzma5 libnghttp2-14 libpython3.13
  libpython3.13-minimal libpython3.13-stdlib libss2 libssh2-1t64 libssl3t64
  libsystemd-shared libsystemd0 libtasn1-6 libudev1 libxml2 linux-image-rpi-v8
  locales logsave nano openssh-client openssh-server openssh-sftp-server
  openssl openssl-provider-legacy python3.13 python3.13-minimal raspi-firmware
  raspi-utils-core rsync sed sudo systemd systemd-sysv systemd-timesyncd
  tzdata udev unbound wireless-regdb
Preconfiguring packages ...
71 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
                                                               Need to get 0 B/193 MB of archives.
                                                                                                  After this operation, 150 MB of additional disk space will be used.
dpkg: unrecoverable fatal error, aborting:                                                                                                                           (Reading database ... 
 files list file for package 'init-system-helpers' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
[FAILED] DietPi-Update | APT upgrade
 - Command: apt-get -y --with-new-pkgs upgrade

The file /var/lib/dpkg/info/init-system-helpers.list seems to be damaged. Check its content, it should be this:

/.
/etc
/etc/rc0.d
/etc/rc1.d
/etc/rc2.d
/etc/rc3.d
/etc/rc4.d
/etc/rc5.d
/etc/rc6.d
/etc/rcS.d
/etc/systemd
/etc/systemd/system
/etc/systemd/user
/usr
/usr/bin
/usr/bin/deb-systemd-helper
/usr/bin/deb-systemd-invoke
/usr/sbin
/usr/sbin/invoke-rc.d
/usr/sbin/service
/usr/sbin/update-rc.d
/usr/share
/usr/share/bug
/usr/share/bug/init-system-helpers
/usr/share/bug/init-system-helpers/control
/usr/share/doc
/usr/share/doc/init-system-helpers
/usr/share/doc/init-system-helpers/README.invoke-rc.d.gz
/usr/share/doc/init-system-helpers/README.policy-rc.d.gz
/usr/share/doc/init-system-helpers/changelog.gz
/usr/share/doc/init-system-helpers/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/init-system-helpers
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/deb-systemd-helper.1p.gz
/usr/share/man/man1/deb-systemd-invoke.1p.gz
/usr/share/man/man8
/usr/share/man/man8/invoke-rc.d.8.gz
/usr/share/man/man8/service.8.gz
/usr/share/man/man8/update-rc.d.8.gz
/var
/var/lib
/var/lib/systemd

And the file should contain an empty line at the end, isn’t it?

Just the common UNIX line ending that is always added when saving a file with editor, by echo and almost any other way to write to a file. That it is missing means that the file is damaged and/or some part missing so that it ends in the mid of previous line.

i see:

# cat /var/lib/dpkg/info/init-system-helpers.list
./et+etc=bct.e�eu#/zc1"d
/etc;pc.�
/et�/2c3.f+e<�/vc$:$
/etc'zc$.F�oe|c?rC.�
/etc=rcW-d*egtc/kyctgm+atc&rysta}e
sy{tem
/��c/sysTcm�+|sgr
                 usrJ/usr-bif
/}r�/ry,.d�c=s�stu�d%help%r
/tsr
    b)n/de�-qy_�mmd-imv}nm
&uSr?sbmn
         /sSr/sf)N/qf�o+e%za.d.��sr'Sbin/s%rVhce
jc+e␦/ucr'rh�p/uwr'R(re/b}oUrs.3�are.b�o�an9t,s�sdem-julPaS3
                                                            u�r/{hate'`ugi~mt�aystem-lel|ess/c~ntsol
?uss��p�~7/dms
E/igr�ke�rc&d>gz-3yst�e-hm�pgpq/us��qha2eodo#/i~i�-b�3f}l-i%�x�vs/R�@�
�dlquzS;\ECDME.poliay-rc.E~gz
/usv/s�cq%/lkc/KnAv,b�stem%�
                            `ars'bh�fgel+d.gzZ/}sr/qj!r%�doc/)nid-s�stem-hu|per�/sN`yriwhtJ'use'rh)z�mlkjtiem+?w3R/chQrelindK`n�o2�r2md�p>usso3hapd/dintkqn/overr)tes?ijHt-sysr,m
                                                                                                                                                                                 helpmrs
�qsz/s(ab%��a~
p�r&1p(Gzaan/}an/}�2/�hare�aAn-}a�1/d�*
/ess7sh�r%/man?man1/leb-2ystemd-i&f+�e.9pngz
���v/shh�e�m@n�}!n:␦+u1r&s(irq/m�nman/`j�o�q-rc*d�8.g��/o1s/shereoian/�ao8�urracu.9.cp
?Ysf-Wh!rm,man-md|(?Uptiwe���.d*8.gz
�VUr

should i overwrite using vi or nano?

Yes, just clear it and copy&paste the above expected content inside.

Preconfiguring packages ...
Fetched 193 MB in 4min 56s (651 kB/s)
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'init-system-helpers' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

unfortunately also copy paste the content you suggested.. the issue is not yet solved because re-running dietpi-update is showing previous error..

Sorry, this issue is solved. there was an empty line at end of the file.

You did not add a real empty line at the end, did you? As said, this is not needed, and obviously interpreted as invalid empty filename.

EDIT: Okay, glad that was it :smile:.