E: Problem executing scripts APT::Update::Post-Invoke-Success [duplicate]

Remove libappstream3 with the CLI command

sudo apt-get remove libappstream3

or

sudo apt remove libappstream3

Afterwards, apt update should work fine again.

Source: https://forum.siduction.org/index.php?topic=6174.0


(in Matthias' comment https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712/comments/24 on bug #1579712) worked for me.

Removing /usr/bin/appstreamcli is fine if you install the fixed package afterwards.

To install this manually, please do (for amd64, adjust URLs for other architectures):

cd /tmp && mkdir asfix
cd asfix
wget https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i *.deb

This should solve the issue.