9

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
  • 122,292
  • 133
  • 301
  • 332
feration48
  • 423
  • 1
  • 4
  • 8

3 Answers3

19

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.

feration48
  • 423
  • 1
  • 4
  • 8
4

You can try this:

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

2

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