Update trouble: signature from user is invalid error, failed to commit transaction conflicting files error

My updates broke again and remained broken for quite a while. I got a keyring issue and the same error message as before, namely:

error: *package* : signature from "User <email@archlinux.org>" is invalid error: failed to commit transaction (invalid or corrupted package (PGP signature)) Errors occured, no packages were upgraded.

Or something to that effect. I just left it since I had more pressing matters at hand, but today I finally decided to RTFM.

I tried this first, as root:

ntpd -qg
hwclock -w

It didn’t work. Then I tried this:

pacman-key --init
pacman-key --populate
pacman-key --refresh-keys
pacman -Sy archlinux-keyring

It started working, then gave me this error:
error: failed to commit transaction (conflicting files) *package* : */path/to/file* exists in filesystem Errors occurred, no packages were upgraded.

So I tried this, from the Pacman page on the wiki:
The problem is usually trivial to solve. A safe way is to first check if another package owns the file (pacman -Qo /path/to/file). If the file is owned by another package, [file a bug report](https://wiki.archlinux.org/index.php/Reporting_bug_guidelines). If the file is not owned by another package, rename the file which 'exists in filesystem' and re-issue the update command. If all goes well, the file may then be removed.

That worked. What was wrong? Seems like a combination of my keys being out of date and some dodgy files lying where they should not have. Fortunately, nobody owned those files so I could rename them and update. Perhaps someone else experienced the same issue, so here’s a possible solution for you.

Try this command & see what happens.

pacman -Scc

pacman -Syyu

Edit: Wrote twice the same thing…

4 Likes

Thank you!

This one seems to clear the cache and unused repositories:

pacman -Scc

This one seems to synchronise package databases, and perform an upgrade. The DB sync part was done, but not the upgrades since I just managed to update everything:

pacman -Syyu

1 Like

@DevilEars , glad it worked.

Edit: Please mark it as solved so that other members can see what solves this issue…

2 Likes

Thank you so much, I’ve been trying to figure out this pacman issue for like a couple days now. So I decided to go on the forum, and this did the trick.

1 Like

You’re welcome! This is a tricky one because it’s not too clear what is wrong or what fixed it.

In my case, I mapped error messages to suggestions in the wiki. I can see what Altman was saying above, it’s perhaps the best place to start if you’re having other issues that are similar but not exactly the same.

@Heliosphan , you re welcome , glad to have helped.

1 Like

Nice, way to go @altman :+1:t5:

:grin:

2 Likes

@anon37345411 , Rock & Roll ! lol

1 Like

This would have helped as well from this post:

https://forum.archlabslinux.com/t/solved-thank-you-broken-updates/194/5

@altman had the right idea, but @DevilEars you may have a keyring issue to fix. Just a thought. :thinking:

1 Like

@sevenday4 m good call, wonder what are his repos, might have to do with this issue as weell as you stated above.

1 Like

Also have a look at this thread concerning changes in repos:

2 Likes

It’s possible. .05 and above are slightly different from earlier versions and seem to have issues with broken or missing keyrings. Especially those that belong to Matt and Nate. Fixing the keyrings now will save a lot of headaches later. :grin:

1 Like

@sevenday4 , so true . & the solution is in the link that you posted about the keys.

1 Like

Thanks, yes mine was a keyring issue mainly. I did sort it out.

2 Likes

You can always do the same with our keyring like you did with the archlinux one, as long as you have our keyring installed archlabs-keyring, and simply run as root

pacman-key --populate archlabs

I realize this issue has been solved already.

2 Likes

I still appreciate the input, since according to my understanding, I just reinstalled the entire keyring parts. That did work, but it doesn’t tell me specifically what was wrong. I know in general that it was a keyring issue, and that reinstalling everything worked.