Error: Failed to download metadata for repo 'appstream'


Using dnf today I got:

Error: Failed to download metadata for repo ‘appstream’: repomd.xml parser error: Parse error at line: 1 (xmlParseStartTag: invalid element name

I searched for this issue and tried several things including:

sudo dnf clean all
sudo rm -r /var/cache/dnf
sudo dnf upgrade

as suggested at:

But I still get the same error.

Any help is much appreciated.


Maybe a broken mirror.

Can you check the content of the downloaded repomd.xml file: /var/cache/dnf/appstream-*/repodata/repomd.xml

Compare with:

Check in /var/log/dnf.librepo.log where AppStream repomd.xml was downloaded from:
grep AppStream /var/log/dnf.librepo.log | grep repomd.xml | tail -1

1 Like

Thanks for responding to my post and your help.
As you mention it was likely a broken mirror, because this morning dnf is working again.