• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Solve an Expired Key (EXPKEYSIG) with Apt

Written by Rahul, Updated on March 1, 2019

During the update of apt-cache or packages installation with the apt package manager, I get the signature expiration message (EXPKEYSIG 8C718D3B5072E1F5). This means that the gpg signature key is expired.

Error

Here is logs on my Debian 9 system:

sudo apt update

Hit:1 http://security.debian.org stretch/updates InRelease
Get:2 http://repo.mysql.com/apt/debian stretch InRelease [19.2 kB]
Hit:3 https://deb.nodesource.com/node_10.x stretch InRelease
Err:2 http://repo.mysql.com/apt/debian stretch InRelease
  The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering 
Hit:4 https://packages.sury.org/php stretch InRelease
Ign:5 http://mirrors.digitalocean.com/debian stretch InRelease
Get:6 http://mirrors.digitalocean.com/debian stretch-updates InRelease [91.0 kB]
Hit:7 http://mirrors.digitalocean.com/debian stretch Release
Reading package lists... Done
...
...

Use the following command to list all keys configured for apt on your system.

sudo apt-key list

You will see the expired key like this.

Expired Key (EXPKEYSIG)

Solution:

Now, update the expired key by running the below command. Here 8C718D3B5072E1F5 is the key was expired on my system.

sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 8C718D3B5072E1F5

You must change 8C718D3B5072E1F5 with the expired key on your system.

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

13 Comments

  1. Avatar tommy Reply
    November 14, 2020 at 7:01 am

    Thanks!
    useful from Taiwan.

  2. Avatar José Marcos Reply
    June 11, 2020 at 10:55 am

    Thank you! Greetings from Brazil.

  3. Avatar eddso Reply
    October 8, 2019 at 1:07 pm

    Its not work on keys for Debian 6. All keyserver provides expired keys.

  4. Avatar Héctor Tello Reply
    August 20, 2019 at 1:54 am

    It worked!! Thank you so much!!

  5. Avatar Gabriel Reply
    July 19, 2019 at 2:05 am

    Worked like a charm, thanks!

  6. Avatar Giancarlo Cunis Reply
    July 9, 2019 at 4:54 am

    This worked for me. Thanks

  7. Avatar George Reply
    June 8, 2019 at 5:41 pm

    Thanks a lot! This really help me!

  8. Avatar Gonzalo Reply
    May 24, 2019 at 9:04 am

    If you got this error:

    gpg: failed to start the dirmngr ‘/usr/bin/dirmngr’: No such file or directory

    Simply install dirmngr:
    https://blog.sleeplessbeastie.eu/2017/11/02/how-to-fix-missing-dirmngr/

    And execute the command again.

  9. Avatar Muhammad Rehan Reply
    May 16, 2019 at 10:21 am

    Thanks for this awesome hack.

  10. Avatar heroasam Reply
    May 13, 2019 at 6:44 pm

    Genio!!!

  11. Avatar Jose Antonio Reply
    May 11, 2019 at 8:48 pm

    Hola, al seguir tus instrucciones me daba lo siguiente:

    sudo apt-key adv –keyserver keys.gnupg.net –recv-keys 8C718D3B5072E1F5
    Executing: /tmp/apt-key-gpghome.EjjsPBXR9j/gpg.1.sh –keyserver keys.gnupg.net –recv-keys 8C718D3B5072E1F5
    gpg: keyserver receive failed: Connection refused

    Lo solucioné de la siguiente manera:

    sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 5072E1F5

  12. Avatar Peeter Reply
    April 22, 2019 at 4:47 pm

    Hi Rahul,

    Your solution works like a charm : ). Thanks for taking the time to publish it out there.

  13. Avatar FDX Reply
    April 21, 2019 at 4:35 am

    Fue de gran ayuda. Muchas gracias !!!

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy