Fixing the Kali Linux Missing Key 827C8569F2518CC677FECA1AED65462EC8D5E4C5 apt update Error: Kali Linux: Fix Sub-process /usr/bin/sqv Error Code 1
If you have just pasted a wall of red text into a search box, this is the line you are looking at:
sub-process /usr/bin/sqv returned an error code (1), error message is: Missing key 827C8569F2518CC677FECA1AED65462EC8D5E4C5, which is needed to verify signature.
Nothing is broken. Your Kali installation's repository
signing key has expired, so apt is correctly refusing to trust the update server. The
fix is to install the current keyring package straight from Kali's own archive — three commands,
about a minute.
Do not "fix" this with --allow-unauthenticated or
[trusted=yes]. Half the answers online tell you to, and they are telling you to
switch off the only thing standing between you and a tampered package.
That is the whole repair. The rest of this page explains what actually went wrong, why it will happen again, and why several popular answers to this error are genuinely dangerous on a security distribution.
Arjun's Wednesday Evening
Arjun is Jake's nephew. He is halfway through a cybersecurity course, and in exchange for lunch at the shop he keeps his uncle's Wi-Fi from being embarrassing.
He had a lab exercise due Thursday. He opened his laptop, ran the command every Kali user runs first, and got a screen full of red.
So he did what most people do at 9pm with a deadline: he searched the error, found a forum answer with plenty of upvotes, and pasted in what it told him to run.
The next morning Ethan looked at his terminal history and went quiet for a second.
"You disabled signature verification," he said. "On Kali. To fix a signature problem."
"It worked though."
"So does removing the batteries from a smoke alarm." Ethan pulled up a chair. "Let me show you what that error actually says, because once you can read it you'll never need a forum answer for it again."
🔬 How this was tested, and what we can't promise
Reproduced on a Kali VM deliberately left un-updated past a key rotation, and on a fresh install from an older ISO — the two situations that actually produce this error. Fix verified on both, plus once with networking restricted to confirm the offline route works.
What we can't promise: exact key IDs and keyring
version numbers change — that is the entire point of key rotation. Any guide quoting a fixed
filename will eventually be wrong, including this one.
So we've included how to find the current one
yourself rather than asking you to trust a number we typed in 2026. Always cross-check against
kali.org/blog.
What the Error Is Actually Telling You
Read it as three separate statements, because that is what it is.
"sub-process /usr/bin/sqv"
sqv is a signature verification tool — part of the Sequoia
OpenPGP suite. Newer Debian and Kali releases call it instead of the older gpgv. So this
is not apt failing. This is apt calling its verifier, and the verifier reporting back.
If you have seen older guides mentioning gpgv or apt-key for this
problem, that is why their commands do not match your system. apt-key has been
deprecated for years.
"returned an error code (1)"
Exit code 1 from a verifier means one thing: verification failed. Not "network down", not "server missing". It looked at a signature and could not confirm it.
"Missing key 827C8569... which is needed to verify signature"
Here is the actual problem. That long hex string is a key fingerprint — the unique identifier of the key Kali used to sign its package list.
Your machine is saying: "Someone signed this with key 827C8569…, and I don't have that key, so I can't tell whether this is genuinely from Kali."
Why any of this exists — the wax seal
"Think of a sealed letter," Ethan said.
Kali publishes a list of available packages. Before publishing, they sign it with a private key only they hold — the equivalent of pressing a wax seal into the envelope. Your machine holds a copy of the matching public key, which lets it check the seal without being able to forge it.
Every time you run apt update, your machine checks the seal. If it matches, the list
is genuinely from Kali and untampered. If it does not, apt stops.
This is the single most important security mechanism in the entire package system. Without it, anyone who could intercept your connection — a hostile Wi-Fi network, a compromised mirror — could hand you a package list pointing at their own software, and your machine would install it as root without hesitating.
🙋♂️ Arjun's Reality Check
"So when I ran the command that made the error go away… I turned off the seal check."
You told apt to install packages without checking who signed them. On a machine you use for security work, on café Wi-Fi, running everything as root. The error was not the problem. The error was the protection doing its job. Your system was telling you it could not verify the update — and the popular answer was to stop asking.
Why Your Key Expired
You did nothing wrong. This is designed behaviour, and it catches thousands of people each time it happens.
Signing keys have expiry dates on purpose. If a key were valid forever, then a key stolen once would be useful to an attacker forever. Expiry limits the damage window and forces periodic rotation. Kali rotates its archive signing key from time to time and publishes the change on its blog.
Here is the trap. The new key normally reaches you quietly, through an updated
kali-archive-keyring package, during a routine update. You never notice. But:
- If your machine sat unused across a rotation, it never received the new keyring.
- If you installed from an older ISO, it shipped with a keyring that was already expired.
- If you use a VM you spin up occasionally for coursework — which is nearly every student — both of the above apply at once.
Then the chicken-and-egg bites: you need apt update to get the new key, and
the missing key is what stops apt update. That is precisely why the fix below
sidesteps apt entirely.
The Safe Fix, Step by Step
Step 1 — find the current keyring filename
Do not trust the version number in any article, this one included. Check for yourself:
- Open
https://http.kali.org/kali/pool/main/k/kali-archive-keyring/in a browser. - You will see a directory listing of
.debfiles. - Take the highest version number ending in
_all.deb.
Note the https://. It matters: TLS is what assures you the file genuinely came from
Kali's infrastructure, and it is doing the trust work that your expired key normally would.
Step 2 — download and install it
cd /tmp wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2024.1_all.deb sudo dpkg -i kali-archive-keyring_2024.1_all.deb
Substitute the filename you found in step 1.
Why dpkg and not apt? dpkg installs a local
.deb file that is already on your disk. It does not need to reach a repository or verify
one, so it works while apt is stuck. apt is the higher-level tool that fetches from
repositories — the very thing that is broken. This is the step that breaks the deadlock.
Step 3 — update, and confirm the red text is gone
sudo apt update
It should complete cleanly. No signature warnings, no missing key. If it does, you are done and
you can run sudo apt full-upgrade normally.
✅ Why this is the right fix
You replaced the expired keyring with the current one, from Kali's own infrastructure, over an encrypted connection. Signature verification stays fully switched on — you did not weaken anything. Every future update is still checked. It takes about the same time as the dangerous shortcuts, and leaves your machine in the state it should be in.
If you have no working network on that machine
Download the .deb on any other computer — Windows, Mac, a phone — copy it
onto a USB stick, then:
sudo dpkg -i /media/<you>/<usb>/kali-archive-keyring_2024.1_all.deb
dpkg genuinely does not care where the file came from, which makes this the reliable
route on a broken or air-gapped machine.
Three Popular Fixes You Should Not Use
All three appear high in search results for this error. All three work, in the narrow sense that the red text stops. That is the problem.
1. --allow-unauthenticated
Tells apt to install packages whose signatures it could not verify. You are not fixing the lock; you are propping the door open. On a distribution built for security work, run as root, frequently on untrusted networks — this is the worst of the three.
2. [trusted=yes] in sources.list
Worse than the first, because it is permanent. You will forget it is there. Six months
later that machine is still installing unverified packages and nothing will ever warn you again. If
you have already added it, remove it now — check /etc/apt/sources.list and
everything in /etc/apt/sources.list.d/.
3. Pulling the key from a public keyserver
This one looks legitimate, which makes it the most persuasive. But public keyservers accept uploads from anyone. They have historically been used to publish keys impersonating well-known projects, and a keyserver cannot tell you whether a key labelled "Kali" is Kali's.
Get the keyring from Kali's own HTTPS archive. That is the only source that vouches for itself.
⚠️ If you already ran one of these
Do not panic — but do clean up, in this order:
- Remove any
[trusted=yes]from your sources files. - Install the proper keyring using the method above.
- Run
sudo apt update && sudo apt full-upgradewith verification working. - If you installed packages while verification was off, on a network you do not control, the genuinely cautious move is to rebuild that VM. Kali installs are disposable by design — that is the whole point of running it in a VM.
Confirming It Actually Worked
"Never assume," Ethan said. "Check, then you know."
sudo apt update gpg --show-keys /usr/share/keyrings/kali-archive-keyring.gpg
The first should finish with no key or signature complaints. The second prints the keys now installed, including their expiry dates — so you can see for yourself how long you have before the next rotation. Note it somewhere.
On some setups the keyring lives at /etc/apt/trusted.gpg.d/kali-archive-keyring.gpg
instead. If the first path is not found, try that one.
Stopping It Happening Again
It will happen again eventually — keys rotate by design. But it only bites people who fit a specific pattern, and that pattern is avoidable.
- Update regularly, even on a VM you rarely use.
sudo apt update && sudo apt full-upgradeonce a month means the new keyring arrives quietly, before the old key expires. This is the entire fix. - Download a current ISO when you rebuild. Kali releases quarterly. Installing from a 2022 ISO in 2026 guarantees this error on first boot.
- Snapshot your VM once it is set up and working. Minutes to restore instead of an evening rebuilding, the night before something is due.
- Skim
kali.org/blogoccasionally. Key rotations are announced there, usually well before they bite.
Arjun now runs updates every Sunday and keeps a snapshot. Total time cost: about four minutes a month.
While You're Here: Check Your sources.list Is Actually Right
A large share of "apt is broken on Kali" problems are not key problems at all. They are people who followed a tutorial that told them to add Debian or Ubuntu repositories to a Kali machine.
Check what yours says:
cat /etc/apt/sources.list
On a standard Kali rolling install it should contain essentially one line:
deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware
That is it. If you see Ubuntu URLs, Debian stable, or a personal package archive someone recommended on a forum, remove them. Kali is Debian-testing-based and rolling; mixing repositories from other distributions produces dependency conflicts that look like key errors, produces genuine key errors of their own, and in the worst case leaves you with a system that cannot be repaired without reinstalling.
Also check the directory that guides love to write into:
ls -l /etc/apt/sources.list.d/
Anything in there you do not recognise or remember adding, move it out of the way rather than deleting outright:
sudo mv /etc/apt/sources.list.d/whatever.list /root/ sudo apt update
If the error clears, you have found your culprit and you still have the file if you need it back.
The Other Four Errors That Stop apt Dead
Once the key is fixed and apt update runs, the upgrade itself sometimes fails with
something new. These four cover nearly all of it.
1. "dpkg was interrupted, you must manually run sudo dpkg --configure -a"
Exactly what it says. A previous install was cut off — closed terminal, power loss, killed process — leaving packages unpacked but not configured.
sudo dpkg --configure -a sudo apt --fix-broken install sudo apt update && sudo apt full-upgrade
If dpkg --configure -a itself fails on one specific package, note the package name
— that is your actual problem, and it is usually a configuration file conflict rather than
anything systemic.
2. "Could not get lock /var/lib/dpkg/lock-frontend"
Something else is using the package system right now — often the automatic update service that ran on boot. Wait two minutes and try again. That fixes it most of the time.
If it persists, check what holds it:
sudo lsof /var/lib/dpkg/lock-frontend
Do not delete the lock file just because a forum said to — that is how you
get a genuinely corrupted package database. Only remove it if lsof shows nothing is
holding it, meaning the owning process died.
3. "The following packages have been kept back"
Not an error at all. apt upgrade refuses to install anything that would require
removing another package. Kali is rolling, so this happens constantly.
sudo apt full-upgrade
On Kali, always use full-upgrade, never plain upgrade.
A rolling distribution expects it. Using upgrade for months is how people end up with a
half-updated system that then breaks in confusing ways.
4. "Unable to fetch some archives" / 404 Not Found
Your package list points at files that have moved — normal on a rolling release if your list is a few weeks stale.
sudo apt update sudo apt full-upgrade
If a specific mirror keeps failing, it may be temporarily out of sync. Kali's
http.kali.org is a redirector that picks a mirror for you; waiting an hour usually lands
you on a different one.
The Same Idea, One Step Earlier: Verifying Your Kali ISO
"You've just learned what a signature check is," Ethan said. "So let's use it where it matters most — before you install anything at all."
A tampered Kali ISO is the single worst thing that can happen to a security learner, because you would then be doing all your security work on a compromised base. The check takes a minute.
Step 1 — checksum (catches corruption)
sha256sum kali-linux-2026.1-installer-amd64.iso
Compare the output against the checksum published on kali.org/get-kali/. If they
differ, your download is damaged — download again.
Step 2 — signature (catches tampering)
A checksum alone proves nothing if an attacker replaced both the ISO and the checksum on a
mirror. The signature is what makes it meaningful: download the SHA256SUMS file and its
SHA256SUMS.gpg signature, then:
gpg --verify SHA256SUMS.gpg SHA256SUMS
You want Good signature from "Kali Linux Repository".
🙋♂️ Arjun's Reality Check
"You'll probably get a warning saying the key isn't certified with a trusted signature. Is that bad?"
No — that's expected, and it's the same concept from the top of
this page. It means you haven't personally vouched for Kali's key in your own keyring. The
line that matters is Good signature. The warning is GPG being pedantic about your
personal web of trust, not telling you the file is suspect.
The Habit Worth Taking From This
Ethan's actual point had very little to do with keyrings.
"You'll hit a hundred errors like this. The instinct will always be to find the command that makes the message stop. Resist it for sixty seconds and ask what the message is protecting. Half the time the error is the system working correctly and telling you something true."
It generalises well beyond Kali:
- A browser certificate warning is not an obstacle. It is the browser telling you it cannot confirm who you are talking to.
- A permission prompt is not friction. It is the boundary you asked for.
- A signature failure is not a bug. It is verification working.
And a few habits that pair with it, particularly if you are learning security on the same machine you use for everything else: work in a VM you can throw away; use a password manager so credentials never end up pasted into terminals and text files; use a reputable VPN on café and campus Wi-Fi, while remembering it protects the connection and not the machine; and keep a backup of coursework somewhere that is not the VM you are about to break.
None of that is exciting. All of it is what separates people who learn this comfortably from people who lose a week.
Questions You're Probably About to Ask
What does "sub-process /usr/bin/sqv returned an error code (1)" mean?
sqv is the signature verification tool apt calls. Exit code 1 means verification
failed — almost always an expired or missing Kali archive signing key. Not a network fault, not
a broken repository.
Why did my Kali signing key expire?
Kali rotates its repository key periodically as a deliberate security practice. Keys carry expiry dates so a stolen key is not useful forever. If your system missed a rotation — unused VM, old ISO — your local keyring is out of date.
Should I use --allow-unauthenticated or trusted=yes?
No. Both disable the check that packages genuinely came from Kali. On a security
distribution running as root, that is a bad trade for zero time saved. trusted=yes is
worse because it is permanent and silent.
Is it safe to add the key from a public keyserver?
Not recommended. Keyservers accept uploads from anyone and have been used to publish keys impersonating real projects. Use Kali's own HTTPS archive, where TLS vouches for the source.
Will this happen again?
Yes, eventually — rotation is the point. Updating monthly means the new keyring arrives before the old key expires, and you never see this error.
Can I fix it if apt is completely broken?
Yes. dpkg -i installs a local .deb and never touches a repository, so it
works when apt cannot. Download the file on another machine and copy it over on a USB stick if
needed.
Does this affect Debian, Ubuntu or Parrot too?
The same mechanism exists on all of them — each has its own keyring package
(debian-archive-keyring, ubuntu-keyring, and so on). The concept and the
approach are identical; only the package name and archive URL change.
Why does apt-key not work any more?
It is deprecated and removed on current releases. Guides telling you to run apt-key
adv --recv-keys predate that change — which is a decent signal that the rest of their
advice is stale too. Keyring packages and /etc/apt/keyrings/ replaced it.
I fixed it but apt full-upgrade now wants to remove packages
Normal after a long gap — Kali is a rolling release and packages get renamed or replaced.
Read the list before confirming. If it proposes removing something you rely on, run sudo apt
--fix-broken install first and re-check.
Should I just reinstall Kali instead?
If the VM is disposable and you have nothing in it, honestly yes — a current ISO is often faster than troubleshooting. But do the keyring fix at least once. Understanding it is worth more than the twenty minutes it saves, and this error will find you again.
Where exactly does the keyring file live?
Usually /usr/share/keyrings/kali-archive-keyring.gpg, with some setups also using
/etc/apt/trusted.gpg.d/. Modern practice is per-repository keyrings referenced by a
signed-by= option in the sources file, rather than one global trusted set — which
is why apt-key was retired. If one path doesn't exist on your system, check the
other.
Why does my system clock cause signature errors?
Because signatures carry validity dates. If your clock is badly wrong — common on VMs
restored from an old snapshot, or a machine with a dead CMOS battery — a perfectly valid
signature can appear expired or not-yet-valid. Check with date, and fix with
sudo timedatectl set-ntp true. Worth ruling out before you touch anything else, because
it takes five seconds.
I get "The following packages have been kept back"
Not an error. Use sudo apt full-upgrade instead of apt upgrade —
on a rolling release like Kali, full-upgrade should be your normal command.
"Could not get lock /var/lib/dpkg/lock-frontend"
Something else is using the package system, usually an automatic update that ran at boot. Wait two
minutes. If it persists, check with sudo lsof /var/lib/dpkg/lock-frontend — and
don't delete the lock file unless that shows nothing holding it.
Should I add Debian or Ubuntu repositories to Kali?
No. This is one of the most damaging pieces of advice circulating in tutorials.
Kali is Debian-testing-based and rolling; mixing in Ubuntu or Debian-stable repositories creates
dependency conflicts and key errors, and can leave a system beyond repair. Your
sources.list should contain the single kali-rolling line and nothing
else.
How do I verify my Kali ISO before installing?
sha256sum the ISO and compare against kali.org, then gpg --verify
SHA256SUMS.gpg SHA256SUMS to confirm the checksum list itself is genuine. A checksum without
a signature check proves only that the file downloaded intact — not that it came from
Kali.
Does this affect Kali in WSL, Docker or a Raspberry Pi?
Yes — same package system, same keyring, same fix. On WSL and Docker you may already be root,
so drop the sudo. On Docker the cleaner answer is usually to pull a fresh
kali-rolling image rather than repair a stale container, since containers are meant to be
disposable.
Coming Up Next
Arjun's next problem was dpkg was interrupted, you must manually run 'sudo dpkg --configure
-a' — the other error that stops a Kali machine dead, and another one where the popular
answers do more harm than good. That is next in this series.
Also worth having open in a tab: fixing Bluetooth in Kali Linux and recovering saved Wi-Fi passwords from the terminal — the two things every Kali learner needs in their first month. The full Kali Linux series is written the same way: the command, and then why it works.
Related Guides
- Fix and connect Bluetooth in Kali Linux
The other thing that never works on a fresh install. - Recover saved Wi-Fi passwords from the terminal
A useful first exercise once apt is working again. - Kali Linux 2025.3: what is new and how to upgrade
Upgrade properly rather than reinstalling. - Kali Linux download links and checksums
Get a current ISO - old ISOs cause this exact error. - Kali Undercover mode
Make Kali look like Windows in a shared space. - Install oniux: kernel-level Tor isolation in Kali
Once your package system is healthy again. - PowerShell commands for beginners
If you are coming to the terminal from Windows.
Originally published May 2025. Rewritten and re-tested in 2026. Keyring version numbers and key fingerprints rotate by design — always cross-check the current filename against Kali's own archive rather than any article, including this one.