How to solve an expired key (KEYEXPIRED) with apt

Updating expired keys on Debian and Ubuntu 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 […]

Read more