AppStream Error in Ubuntu 16.04 Xenial

I’d been seeing this error recently:

AppStream cache update completed, but some metadata was ignored due to errors.

According to a Q&A on AskUbuntu, this is the result of a bug in the app stream package.

The package has as of 24 December is not yet in the package updates for 16.04; therefore, to fix it one either needs to add it from the proposed repository or from the backports repository.

Once you’ve enabled the backports repository (which you may not have to do at all) you can specifically pull the package from backports with this command:

sudo apt install appstream/xenial-backports

Now instead of the default version 0.9.4, you should have the updated version (0.10.1 of this writing):

appstreamcli —version
AppStream CLI tool version: 0.10.1

To complete the process, you need to update the cache data:

sudo appstreamcli refresh —force

Then make sure to do an update and upgrade to get any missed updates:

sudo apt-get update
sudo apt-get upgrade

And clean up the last of the update by removing the now unneeded libappstream3:

sudo apt-get autoremove

This should fix the problem once and for all.

3 thoughts on “AppStream Error in Ubuntu 16.04 Xenial”

  1. I was getting the error below today when running apt update, even with sudo, even after sudo -i, removing the default cache folder manually, and after chmod 777 /var/cache/app-info/xapian/default -R (although it did seem to download package info after the last one, still threw an error though).
    ** (appstreamcli:23207): CRITICAL **: Error while moving old database out of the way.
    AppStream cache update failed.

    Using the above post to get the backport (at time of this comment 0.10.6) cleared this trouble, also. Thank you!

  2. There is a formatting error for the version command above, should be ‘dash”dash’ not ‘single long dash’ (which results in cut’n’paste of command not working).

    On Xenial 16.04 (as of 2018-10-21)

    appstreamcli –version

    AppStream CLI tool version: 0.10.6

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s