The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging

The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging

While doing apt updates i ubuntu if you are getting below error

Err:16 https://dl.yarnpkg.com/debian stable InRelease
  The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
Fetched 93.1 kB in 5s (19.8 kB/s)
Reading package lists... Done
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>

Then it means your server is using old expired key. You will have to update the key using below command

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