Can't reach login screen after accidental power loss during an upgrade [duplicate]

During the upgrade, my computer shut down.

After starting it I see a black screen with [OK] sentences with finished tasks after them. The last one is:

[OK] Started GNOME display Manager. 
     Dispatcher Service...ed database.s.pp link was shut down...

Do I need to format my computer?
If not, what else can I do?


You could try the recovery mode.

Then I'd try to restart the upgrade process with

do-release-upgrade

If that doesn't work, try the following:

apt-get install -f

dpkg --configure -a