Dietpi Update failing

Creating a bug report/issue

Required Information

  • DietPi version | `
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=13
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘applied’
    G_LIVE_PATCH_STATUS[1]=‘not applicable’
  • Distro version | `
  • Kernel version | Linux DietPi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
  • Architecture | armhf
  • SBC model | RPi3
  • Power supply used | 5V
  • SD card used | Sandisk

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

Trying to update with diepti-update

Expected behaviour

Updated done

Actual behaviour

Having this error

[FAILED] DietPi-Update | APT update
 - Command: apt-get -y update

---------------------------------------------------------------------
- DietPi has encountered an error                                   -
- Please create a ticket: https://github.com/MichaIng/DietPi/issues -
- Copy and paste only the BLUE lines below into the ticket          -
---------------------------------------------------------------------
#### Details:
- Date           | Thu Sep 14 15:14:00 CEST 2023
- DietPi version | v8.13.2 (MichaIng/master)
- Image creator  | DietPi Core Team
- Pre-image      | Raspbian Lite
- Hardware       |  (ID=)
- Kernel version | `Linux DietPi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux`
- Distro         |  (ID=)
- Command        | `apt-get -y update`
- Exit code      | 2
- Software title | DietPi-Update

Steps to reproduce:

Expected behaviour:

Actual behaviour:

Extra details:

Additional logs:

/usr/bin/apt-get: line 1: $'': command not found
/usr/bin/apt-get: line 1: $'K\241\224\200p\365T\276\245\233\321X#o1\315m\247\226\214': command not found
/usr/bin/apt-get: line 1: $'i
                             \205uŇر\225\334\370\254Z\200W
                                                          MJ\300D^[\306\333.Rbgd\367N-\371B\223\266\340\204Ī\270^\220}\215\267\251\327351w\255\200C\32M\231]\377\202յ\310fd\202p\232E\253+\205G\262\236\256ar-\365\367\364\331\241M\246K^t˘"\352"\261\334ʝ\3313ViK>\26ט
                                                                                                                                                                                                                                                                       \362\375\277\211d!\372\374e)!Jc\362͂\273Z|\274\354\223t-\305\350$\373\216u+\202\276234\342\336\270~\301\300\343\355\'\234\272|И\302%zz9\334\325�\243\376\320\345}T\2742Lb\207\337\313\376sq4\361\256\270f\325,\367M~wm\265\311\312Cg},^=z\252\350\247V\342\270\177
                                                                                                                                                                                                       \234': command not found
/usr/bin/apt-get: line 2: $'Qbݗ\220': command not found
/usr/bin/apt-get: command substitution: line 1: unexpected EOF while looking for matching `"'
/usr/bin/apt-get: line 2: Q: command not found
/usr/bin/apt-get: command substitution: line 2: syntax error: unexpected end of file
/usr/bin/apt-get: command substitution: line 3: unexpected EOF while looking for matching `''
/usr/bin/apt-get: command substitution: line 4: syntax error: unexpected end of file
/usr/bin/apt-get: command substitution: line 1: syntax error near unexpected token `$'\263\330\332IŅ\361\362u\255Z\246g\233
                                                                                                                           \257N\226
                                                                                                                                    V\323\326#\246N\206\232\214/\374fve\232\240A\243\210$L\256\331\302\341jO\376Z_\204k\266\177\342m.+\216\322\364E:O?b\266\344ؾ9h\316CW\260\257,\243z\375U}
                                                                                                                                                                                                                                                                                            \203\231\274\222\204\240\303HL\313K\2!\255\230ڳ\276\202\266\207\3008\240\3044\303m\242\331*%}nG-\305K\257''
/usr/bin/apt-get: command substitution: line 1: `�X���U_�~��N�q�(���IŅ��u�Z�g�
                                                                              �N�
                                                                                 V��#�N���/�fve��A��$L����jO�Z_�k��m.+���E:O?b��ؾ9h�CW��,�z�U}
!��ڳ�����8��4�m��*%}nG-�K�'                                                                                                                   �������HL�K�v��R-�
/usr/bin/apt-get: line 1: ��Sg�������8A��������䵶�������s`�X���U_�~��N�q�(���IŅ��u�Z�g�
                                                                                       �N�
                                                                                          V��#�N���/�fve��A��$L����jO�Z_�k��m.+���E:O?b��ؾ9h�CW��,�z�U}
!��ڳ�����8��4�m��*%}nG-�K�`5���p���w��,�%���]�z0��4�: No such file or directory                                                                        �������HL�K�v��R-�
/usr/bin/apt-get: line 1: ��Zt��N���5s�s�` ��PPLoA��d�T͡b���Z���r92�
�o��j��T��F�\��h���XU�D�Yyֈ:�p$Y߶�
��� 4g��h|�������;�KK���$���ޮ���������M{�q�ͥ��-}'��[�
                                                   }���"�k� Ԧg!�        QRP�������&q[*�J@���q�� ��L��1�еg���.S*�ľ�S�/�
R���K�\�81�$g%Ro����Z%�d�nܳ                                                                                            p�@�
                          3k*{�ƭQ*��oꓬ�<��+(��а�:S.9q�JMn`X6ъ���o���L�=r�U�/d��: No such file or directory
\307\337yi\262\202\274\250,B\271\232ϰ\365*\253%ʩr#\301\234\251\364\337x\333\316\300\363\232}0\242v[\220\363\265ݘwg''
��yi����,B��ϰ�*�%ʩr#�����x����}0�v[���ݘwg'

---------------------------------------------------------------------
[FAILED] DietPi-Update | Unable to continue, DietPi-Update will now terminate.

Extra details

Looks like you have data corruption.
Do other systems commands work, e.g. ls?

Yes, but everything related with apt, ap-get and, obviously, dietpi-update, didn’t work, the last thing I’m receiving is

/var/cache/apt/archives/partial is missing

I have a backup made, if I remove the SD and reinstall dietpi from scratch, I will recover my setup from this backup? or I need to do all the setup again?

Hm did you make the update before the errors happend? Otherwise you probably backed up the already corrupted data and them restore the corrupted data.

No, the error start happening after an unexpected shutdown because an energy lost in my building…time ago I suffered the same and fix that with an dietpi-update…but now this doesn’t work…the error appears when I’m trying to do dietpi-update…but I didn’t try a dietpi-backup before that, the backup I have is from months ago, last dietpi-update that worked perfectly, June

At least you can give it a try to restore the backup on a new system

Or just copy manually the apt binaries for testing?

It might be more files corrupted. Going to all of them one by one seems to be impossible. Therefore restoring an old backup on a new system seem best was atm