Linux Mint 17/Ubuntu 16.04 Bazel Key Expired - KEYEXPIRED 1527185977

In this post:

How to solve invalid: KEYEXPIRED 1527185977

While updating older versions of Ubuntu and Linux Mint new error appear:

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: http://storage.googleapis.com stable InRelease: The following signatures were invalid: KEYEXPIRED 1527185977 KEYEXPIRED 1527185977 KEYEXPIRED 1527185977

W: Failed to fetch http://storage.googleapis.com/bazel-apt/dists/stable/InRelease  

W: Some index files failed to download. They have been ignored, or old ones used instead.

If you need to use bazel then you can update the key with:

curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
sudo apt-get update

This should resolve the issue with this key.

Source:

Ubuntu 16.04 PPA key expired

Ubuntu / Linux Mint list and remove apt/gpg keys

In Ubuntu you can list keys by:

apt-key list

or filtering the keys with:

apt-key list | grep 'google'
apt-key list | grep 'bazel'

Removing a key is done by command(the key identifier is taken from the previous command:

sudo apt-key del 7FAC5991

Linux Mint update and remove GPG keys manually

If you don't want to use linux terminal then you can simply update your Authentication Keys (GPG. apt-get keys) by the user interface. For Linux Mint 17 and above:

  • Menu
  • Administration
  • Software sources
  • Authentication Keys
  • Remove or Download a key

Ubuntu update and remove GPG keys manually

Sometimes in Ubuntu you will need to download missing keys. If you are not experienced enough you can try by using the graphic interface:

  • Menu
  • System
  • Administration
  • Software sources
  • Authentication
  • Import Key File or Remove

Ubuntu solve an expired key/KEYEXPIRED

First you need to find the problematic keys with:

apt-key list

Then you can update the key by(example for Google Chrome):

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

Finally you can update:

sudo apt-get update

Related Article