• 4

While updating my packages on a debian based system by a

sudo apt-get update

I've got that error message :

Reading package lists... Done
W: GPG error: stable/non-US Release: 
The following signatures were invalid: KEYEXPIRED 1138684904

What should I do to fix this ?

Software updates and package management is easy with systems based on Debian or Ubuntu. Just apt-get update (or apt update) and run an upgrade. But sometimes you may encounter the following situation: a KEYEXPIRED message.

root# apt-get update && apt-get upgrade
Get:1 xenial-security InRelease [94.5 kB]
Hit:2 xenial InRelease
Get:3 xenial-updates InRelease [95.7 kB]
Hit:4 xenial-backports InRelease
Hit:5 stable InRelease
Get:6 xenial-updates/main amd64 Packages [373 kB]
Ign:7 xenial InRelease
Get:8 xenial Release [2,309 B]
Get:9 xenial Release.gpg [287 B]
Get:10 xenial-updates/main i386 Packages [368 kB]
Get:11 xenial-updates/universe amd64 Packages [319 kB]
Get:12 xenial-updates/universe i386 Packages [316 kB]
Err:9 xenial Release.gpg
The following signatures were invalid: KEYEXPIRED 1471427554
Fetched 1,566 kB in 0s (2,003 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: xenial Release: The following signatures were invalid: KEYEXPIRED 1471427554
W: Failed to fetch The following signatures were invalid: KEYEXPIRED 1471427554
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
apparmor libapparmor-perl libapparmor1 python3-distupgrade python3-software-properties software-properties-common ubuntu-release-upgrader-core
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/672 kB of archives.
After this operation, 5,120 B of additional disk space will be used.
Do you want to continue? [Y/n] y

  • 0
Reply Report

It might also happen when the date is not correct.

Check the date with


If it's misconfigured, do the following to set your timezone and date auto synchronization.

apt-get install ntp ntpdate && service ntp stop
dpkg-reconfigure tzdata
service ntp start
  • 0
Reply Report