@vordenken Some sort of atomic filesystem would be a drop-in solution. I don't know if such a thing practically exists.
If the updates are atomic (either happen or don't happen, nothing in between) then it would work, but I don't know of a package manager that has atomic updates.
@vordenken @skunksarebetter I'm not sure what the Linux-based stuff is doing these days, but ESP32 microcontrollers (which do have OTA updates and a partitionable filesystem on top of their Flash) require you to partition two app partitions and OTA is done by downloading into the spare one, verifying, and then flipping the bit which indicates which one to boot.