SoFunction
Updated on 2025-05-20

How to solve the problem of GPG signature error in Kali Linux APT update

Problem background

Kali Linux uses APT package manager from official software sources (e.g.) Get packages and updates.

To ensure the security of downloaded content, Kali's software source uses GPG signature verification. However, if the system lacks the correct public key or the software source is configured incorrectly, APT will refuse to update, throwing an error similar to the following:

Err:1 /kali kali-rolling InRelease
  Sub-process /usr/bin/sqv returned an error code (1), error message is: Missing key 827C8569F2518CC677FECA1AED65462EC8D5E4C5
W: GPG error: /kali kali-rolling InRelease: Sub-process /usr/bin/sqv returned an error code (1)
E: The repository '/kali kali-rolling InRelease' is not signed.

This error indicates that APT cannot verify the signature of the software source, possibly due to a lack of a key or configuration problem.

Don't worry, let's solve it step by step!

Cause of error

Common causes of GPG signature errors include:

  1. Missing or expired GPG keys: Kali regularly updates its signature key (such as the April 2025 key change), but your system does not synchronize the latest key.
  2. Software source configuration error/etc/apt/The source address in the might be unofficial mirror or a malformed format.
  3. Keyring package is damagedkali-archive-keyringPackage is missing or the version is too old.
  4. Network issues: Cannot download key or metadata.
  5. Caching issues: The APT cache may contain corrupt metadata.

Solution steps

The following are detailed steps to fix GPG signature errors, performed in sequence, and it is recommended to carefully check the output of each step in the terminal.

1. Check the software source configuration

Make sure to use the official Kali software source to avoid signature issues caused by unofficial images.

Open the software source configuration file:

sudo nano /etc/apt/

Make sure to include the following lines (officialkali-rollingsource):

deb /kali kali-rolling main contrib non-free non-free-firmware

Delete or comment (add#) Unofficial source (such as/kali). Save and exit (Ctrl+OEnterCtrl+X)。

2. Import the latest GPG key

Error message missing key827C8569F2518CC677FECA1AED65462EC8D5E4C5, we need to import it manually.

  • Download the official keyring file:
wget /
  • Import the key to the APT:
sudo mv  /usr/share/keyrings/
  • Clean up temporary files:
rm 
  • hint: If the system is older, try the old method:
sudo apt-key add 

3. Install the kali-archive-keyring package

Provided by Kalikali-archive-keyringThe package contains all official keys, and installing or updating this package once and for all.

  • 1. Try installing:
sudo apt update --allow-insecure
sudo apt install -y kali-archive-keyring

--allow-insecureTemporary bypass signature verification, only for this step.

  • 2. If it fails, manually download and install the latest package:
wget /kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2024.1_all.deb
sudo dpkg -i kali-archive-keyring_2024.1_all.deb
  • examineKali Software PoolGet the latest version.

4. Clean up the APT cache

The damaged cache may interfere with the update, try again after cleaning.

sudo apt clean
sudo apt autoclean
sudo apt update

5. Test updates and upgrades

Verify the repair effect:

sudo apt update
sudo apt upgrade -y

If the update is successful, you will see that the software source metadata is retrieved normally without GPG errors.

6. Check the network (if still fails)

Network problems may cause key download to fail.

  • Test connection:
ping 
  • Configure DNS:
sudo nano /etc/

Add to:

nameserver 8.8.8.8
nameserver 8.8.4.4

Preventive measures

To avoid encountering GPG errors again in the future, it is recommended:

Regularly update the system

sudo apt update && sudo apt upgrade -y

Follow the official announcement: Kali may change the key, checkKali BlogOr official X account.

Backup configuration: Modification/etc/apt/Backup before.

Use official sources: Avoid unofficial mirroring and use it first

Frequently Asked Questions

What should I do if the key download fails?

  • Check the network, or fromKali official websiteDownload manually.debBag.
  • Use USB to transfer to system installation.

Prompt key ID does not match?

  • Delete the old key:
sudo apt-key del 827C8569F2518CC677FECA1AED65462EC8D5E4C5

Re-import the official key.

Still unable to update?

Try other official images (e.g./kali)。

  • Check the system version:
cat /etc/os-release

Make sure to run the latest Kali (such as 2025.1a).

Summarize

GPG signature errors are a common problem in Kali Linux updates and are usually caused by missing keys or incorrect source configurations.

Pass the check/etc/apt/, import the latest key and installkali-archive-keyring, you can solve the problem quickly.

Keeping the system updated and using official sources is the key to avoiding similar errors.

Reference resources

  • Kali Linux official documentation
  • Kali Forum

The above is personal experience. I hope you can give you a reference and I hope you can support me more.