I was upgrading Ubuntu 18.04 to Ubuntu 20.04 using do-release-upgrade -f DistUpgradeViewNonInteractive, but the upgrade halted due to a power cut and upon resuming the upgrade I was getting the following errors:

  1. In the hope to resume the upgrade, upon execution of do-release-upgrade -f DistUpgradeViewNonInteractive I get:
$ sudo do-release-upgrade -f DistUpgradeViewNonInteractive
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release
set Prompt=normal in /etc/update-manager/release-upgrades.
  1. I tried to resume the installation of packages using apt-get update --fix-missing and I get:
$ sudo apt-get update --fix-missing
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
appstreamcli: symbol lookup error: appstreamcli: undefined symbol: AS_APPSTREAM_METADATA_PATHS
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi'
E: Sub-process returned an error code

I tried searching for solutions on Google and Stack Overflow's Websites, I got many related issues, but no one was answering the question of my exact problem, i.e. to resume an interrupted upgrade and getting the error of appstreamcli.

So, I am presenting how I fixed the problem.

If you have solved this problem using any other approach, you are welcome to mention it.


I tried the following steps:

First I tried purging using sudo apt-get purge libappstream3 as suggested here, but this package was not found in the system.

Then, as suggested in this blog post and this comment, and I tried sudo dpkg --configure -a, and the installation resumed and completed without any error.

After that, I tried running sudo apt-get update && sudo apt-get upgrade -y and it worked properly and updated the packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.