apt-get update

I receieved the following error when attempting to upgrade my MQTT server running on a Raspberry Pi:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mosquitto.org jessie InRelease: The following signatures were invalid: KEYEXPIRED 1515017477 KEYEXPIRED 1515017477 KEYEXPIRED 1515017477 W: Failed to fetch http://repo.mosquitto.org/debian/dists/jessie/InRelease  W: Some index files failed to download. They have been ignored, or old ones used instead.

The “apt-get update” step was failing and no updates were being performed.   To resolve this problem I did the following:

  •  Enter the followning command:

$ apt-key list

This generated the following output:



pub   2048R/90FDDD2E 2012-04-01

uid                  Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <mpthompson@gmail.com>

sub   2048R/5373DC6C 2012-04-01

pub   2048R/7FA3303E 2012-06-17

uid                  Raspberry Pi Archive Signing Key

sub   2048R/EDD83D6C 2012-06-17

pub   4096R/30993623 2013-01-04 [expired: 2018-01-03]

uid                  Mosquitto Apt Repository <repo@mosquitto.org>

pub   4096R/68576280 2014-06-13

uid                  NodeSource <gpg@nodesource.com>

sub   4096R/AA01DA2C 2014-06-13

Notice the expierd key and enter the followning command:

$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 30993623

This generated the following output:

Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –homedir /tmp/tmp.mVkfTM2DDt –no-auto-check-trustdb –trust-model always –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver keys.gnupg.net –recv-keys 30993623

gpg: requesting key 30993623 from hkp server keys.gnupg.net

gpg: key 30993623: “Mosquitto Apt Repository <repo@mosquitto.org>” 2 new signatures

gpg: Total number processed: 1

gpg:         new signatures: 2

I was then able to successfully perform the apt-get update

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.