I am trying to use apt with a repo that hasn't been touched in a long time. Unfortunately the gpg key for said repo is expired (I tried updating it from a variety of keyservers, no luck)

I would rather not disable signature checking completely, is there any way to tell apt to verify signatures against expired keys?


I have come to the conclusion that there is no way to disable this check in apt, the code that implements the check is the following in methods/gpgv.cc.

if (strncmp(buffer, GNUPGKEYEXPIRED, sizeof(GNUPGKEYEXPIRED)-1) == 0)
   if (Debug == true)
      std::clog << "Got KEYEXPIRED! " << std::endl;

And it doesn't seem to be be behind any form of conditional.

However the check can be worked around by using faketime. e.g.

faketime 2017-01-01 apt-get update
  • Excellent answer for a seemingly poor question. +1 – Rui F Ribeiro Feb 21 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.