How to fix this pacman error?

error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format

sudo pacman-mirrors -f && sudo pacman -Syyu

I’ve done that couple of times but the error still remains.

I see two possibilities:

  1. run fsck on your drive
  2. delete the folder with the db
    sudo rm -R /var/lib/pacman/sync
    and try again

Still go no luck. That means I have to reinstall the OS?

What’s the output of:

file /var/lib/pacman/sync/community.db


cat  /etc/pacman.d/mirrorlist

As suggests, you can try a pacman -Syyu to re-download the databases.

You can try reading the thread before posting. It was mentioned twice. :wink:

Either @fahimscirex solved the issue or gave up and installed something else. We may never know.

Oh yes, you are right. My bad.