I had a power failure during a ubuntu system upgrade on a pi, which well and truly borked things. The pi booted, but the upgrade was half–baked: indeed, the system was broken. I could neither finish nor revert the upgrade.
A number of online sites suggested some bash sudo wizardry to rescue the mess. All the suggested wizardry required root access. But that proved to be slightly problematic….
Rather that trying to rescue that broken upgrade, were it even possible, I installed 26.04 afresh, and restored the services from backup.