Dietpi Update failing

Creating a bug report/issue

Required Information

  • DietPi version | `
    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: -
- 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
                                                                                                                                                                                                       \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
/usr/bin/apt-get: command substitution: line 1: `�X���U_�~��N�q�(���IŅ��u�Z�g�
!��ڳ�����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�
!��ڳ�����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�
��� 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

[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