E: Problem executing scripts APT Update::Post-Invoke-Success error during apt-get update

This worked for me (From here, https://forum.siduction.org/index.php?topic=6174.0):

sudo apt-get purge libappstream3

sudo apt install --reinstall libappstream3

can fix it.


I came from this page and was redirected here, over there I cannot answer but this is actually an answer for that page. Since I had the same issue (at least same as one of the related issues, but hey I did not relate them so sorry if it is not right solution for you ) and found it quite difficult to find the right information, but in the end succeeded, I thought why not share it here. It took me 2 days evening hours to put the pieces together but this is what I did, hope it helps some of you.

I followed this procedure to clean the mess, made a backup first, just in case.

sudo apt install appstream/xenial-backports
sudo rm /etc/apt/apt.conf.d/50appstream
sudo rm /var/cache/app-info/xmls/fwupd.xml
sudo apt install --reinstall libappstream4
sudo appstreamcli refresh --force
sudo reboot

Not sure if the reboot is necessary but after reboot I did:

sudo appstreamcli refresh --force

and had no more errors.

Tags:

Apt

Appstream