Kali Linux Update Fails – Key Outdated

If like me you have Kali Linux installations you may have come across a slight problem recently whereby the public key had expired resulting in an error when attempting to update. You likely received something similar to the example below when attempting an apt update –

[email protected]:/# apt update
Hit:1 https://apt.dockerproject.org/repo debian-stretch InRelease
Get:2 http://ftp.hands.com/kali kali-rolling InRelease [30.5 kB]
Err:2 http://ftp.hands.com/kali kali-rolling InRelease

The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>

Fetched 30.5 kB in 1s (43.2 kB/s)
Reading package lists... Done
Building dependency tree 
Reading state information... Done
All packages are up to date.

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.hands.com/kali kali-rolling InRelease: The following signatures were invalid:EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.

[email protected]:/#

I must admit I don’t update Kali as often as I should but then again I have a large number of systems/applications/problems to take care of so it’s hardly the top of my priority list. Thankfully the solution to this problem is as simple as importing the new public key and running our update again.

First we will add the new key using the command wget -q -O – https://archive.kali.org/archive-key.asc | apt-key add

[email protected]:/# wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add
OK
[email protected]:/#

It’s important to note that the space between the hyphen and the URL is intentional so please keep that in mind when entering the command.

Now that’s done we can run our update again to see if there are any available packages –

[email protected]:/# apt update
Hit:1 https://apt.dockerproject.org/repo debian-stretch InRelease
Get:2 http://ftp.hands.com/kali kali-rolling InRelease [30.5 kB]
Get:3 http://ftp.hands.com/kali kali-rolling/main amd64 Packages [15.8 MB]
Get:4 http://ftp.hands.com/kali kali-rolling/contrib amd64 Packages [115 kB]
Get:5 http://ftp.hands.com/kali kali-rolling/non-free amd64 Packages [163 kB]

Fetched 16.0 MB in 5s (3,277 kB/s)

Reading package lists... Done
Building dependency tree 
Reading state information... Done
463 packages can be upgraded. Run 'apt list --upgradable' to see them.

[email protected]:/#

That’s more like it, 463 packages for me to update! If you are curious what that .ASC file actually contains it’s simply the PGP public key as shown below.

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBE9U1CgBEAChen9+cvBS8ioHoCU6wBbL9jaIk5P7ZkPpjDsovMvimqZaozS8
fEAZM23gJlFratc+rRllV9hPZmGqhtT50RLDzC3yFOvFnJqAPvpVDO2ipQCVnJDX
0eWDhT62RDwk+FhjksEDwP7Yc4CgohdGDYQu1zTBSLL5qen3rckCnHF2OnSiKnYM
8YCIKAYMt4VRArAvivjOMspN+1xy2S8GYXX2felsu3Ir1DXvUIE7b/9sdK6MzBcq
joDH34OqX6isqAW0+K93lmVN+U4yFMzfEB74UMQNWKg39mCB0K/VfQ89ih4zvF9a
zENbFzfF0O0h09oHF4ZTaUFeI8JImp/x9FC+LveUyJot9t/xv0HVUd08Y4PgO48C
iXOTqqqm/DPF0AbHJGpTuonOsKy3/dYhk7Fvsfn02DMds+RKsukBEzypTIIIzMBF
Uwiq/GaaNRWw6lnOyE4wMmpwRa11QVDDWkMpuOr1tPV7M+EMAhZY7cyHDmRTOFL3
H0CxYnInis+k1NQikqtLxNrzWdxsXU25BMbEsAQq7aRTs7wpOnUK+yY+qTG/V5nl
J6II+/CtWJthIef22r8EYX1BQOXRggamy0nxViC3S6kjuU2Lb1qnDb/c7T9hB723
4T9yrRHJbygTvQD8BJBADgRy7+XInCp01V4nAJZSu20qopEg082SdWK9FwARAQAB
tCZLYWxpIExpbnV4IFJlcG9zaXRvcnkgPGRldmVsQGthbGkub3JnPokCVQQTAQIA
PwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AWIQRExlE6jk+z0wh191jtRE/w
fY0L9gUCWmm4hgUJEMWt3gAKCRDtRE/wfY0L9qnvD/0dKuVKCGUQscp3LrZ50Brc
Ramb0EF2WjuqVoSrrPaelwhda4KTmb9dZ7SLB9Rr7XOS/iKf1R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spam. Learn how your comment data is processed.