Recovering a failed Ubuntu upgrade

Sometimes an Ubuntu in-place upgrade will error, failing to install packages like:


At the end of the install, the Ubuntu upgrade installer said the install had failed, and it was going to revert with dpkg --configure -a. That will typically also fail. As a last resort, consider a recovery procedure as below. This will keep the new Ubuntu version if it works.

  1. open a second Terminal, WITHOUT clicking close on that error:

    apt install gvfs init systemd-sysv
  2. in the same new Terminal: