7

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
  • 114,770

3 Answers3

16

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
  • 372
  • 4
  • 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
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
Bl00dh0und
  • 151
  • 3
1

You can try this:

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