Knowledge Base: Resolving hard upgrade issues

This document collects hard upgrade problems and how to work around them. It’s not a interactive support thread, however.

In all these cases, please run ubuntu-bug ubuntu-release-upgrader to file a bug against the ubuntu-release-upgrader package after finishing the upgrade, this will take care of uploading the upgrade log to allow us to fix the issue for other users.

Continuing an interrupted upgrade

To continue an interrupted upgrade, you can use:

  • Run apt install --fix-broken
  • Run apt dist-upgrade
  • Run apt autoremove -o APT::AutoRemove::SuggestsImportant=false to remove unused packages, including ones still Suggested by other packages (as ubuntu-release-upgrader does)

after resolving the issues you had, some of which are listed below.

Common issues

My upgrade failed with a missing library

First of all, you’ll have to look at the upgrade output and see which package failed to install and resolve that failure. For example, if a library was missing you may have to apt download the package providing that library, usually a libfoo.so.0 is in a package called libfoo0 or libfoo0t64. Then use dpkg --unpack to unpack the library and try to continue the update.

My upgrade failed and apt install --fix-broken doesn’t work.

This is a very tough cookie. You may be able to recover with some manual dpkg shenanigans to get apt install --fix-broken to a state where it works again.

What you want to try is:

  • Check which packages are in /var/cache/apt/archives. Make sure that there are only files for the release upgrade in there, likely by looking at their timestamps.
  • Repeatedly run dpkg -i /var/cache/apt/archives/*.deb until apt install --fix-broken works again
  • Continue the upgrade
3 Likes

Thank you! I had a tough cookie because I locked my screen during the upgrade, at the exact step where it apparently broke everything (I got a message with instructions on how to unlock using the terminal but it didn’t work, the upgrade was simple halted and broken to no avail)

This dpkg -i /var/cache/apt/archives/*.deb also produced the “too many errors” problem

dpkg -i /var/cache/apt/archives/*system*.deb failed too

surprisingly apt install /var/cache/apt/archives/*system*.deb did the trick!

Thank you for those tips, you saved my install :smiley:

1 Like