6

I am trying to update my Kubuntu 22.04 LTS. This error occurs:

7 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
W: Failed to fetch https://dl.yarnpkg.com/debian/dists/stable/InRelease  The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
W: Some index files failed to download. They have been ignored, or old ones used instead.

How to solve this issue? I completely removed yarn with sudo apt-get purge --auto-remove yarn, but seems that I have to edit source file and remove all link to yarn repository. How to get rid of the invalid signatures in the system?

Any ideas?

karel
  • 110,292
  • 102
  • 269
  • 299
feration48
  • 323
  • 2
  • 7
  • Does this answer your question? [The following signatures were invalid: EXPKEYSIG 1397BC53640DB551](https://askubuntu.com/questions/1133199/the-following-signatures-were-invalid-expkeysig-1397bc53640db551) – karel Mar 03 '23 at 10:48

3 Answers3

14

rm /etc/apt/sources.list.d/yarn.list will resolve the missing dependencies.

This will work only in case if when the yarn is previously to be removed from the system.

Elan Hasson
  • 362
  • 4
  • 7
feration48
  • 323
  • 2
  • 7
  • 1
    `rm /etc/apt/sources.list.d/yarn.list` is simpler and avoid running `rm -rf …` and erase files by mistake. – A.L Feb 19 '23 at 12:10
1

You can try this:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

1

Or for using keyrings to avoid apt-key depreciation issues (e.g. Ubuntu 22.04):

curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/yarn.gpg
Bl00dh0und
  • 141
  • 3