Extra details
Things like dietpi-config and dietpi-software work, but this breaks apt, ls, dir, and other commands. I have to reformat my SD card and start with a fresh copy of the OS just to get basic functionality working again
Using the built-in SSH server to run commands and look at terminal output
Welcome to our community.
Usually it is not possible for apt package manager to break an entire system. Probably you have some file system corruption or a dying SD card. You could try checking for kernel error messages
dmesg -l err,crit,alert,emerg
This is btw not an error but an info that due to the missing package, possibly existing interactive package debconf options are not offered in a bunch before all package installs start, but during their installation. It is not required for anything than the comfort to pre-configure everything than go and drink a coffee, when you install a large number of packages
.
However it shouldn’t break the system either of course.
The reason why your system breaks is that you install an ARMv7-only PHP on an ARMv6-only RPi. I’m also wondering why it breaks the whole system instead of only leading to a failing PHP service, but it’s known like that. I already reported this to Ondrej years ago, but since it is explicitly an ARMv7 repository, he didn’t find it reasonable to have a closer look.
If I remember right, it really is impossible now to do anything, especially purging the package again, right? So I’m AFRAID you need to reflash and stay with PHP7.4.
… ah another thought and explanation: The package pulls a lot of very basic system library upgrades from that repo, like libSSL. So every command with relies on any of those libraries is doomed to fail. Makes all sense then.