| Tested on | Kali GNU/Linux Rolling 2026.2 (kali-rolling) |
|---|---|
| Package | apt 3.2.0+kali1kali-tweaks 2026.2.0 |
| Applies to | Kali Linux (amd64) |
| Privilege | sudo to edit /etc/apt/sources.list.d/ and run apt update |
| Scope | Read the active deb822 kali.sources file, compare deb822 vs legacy one-line formats, understand Kali branches, switch rolling vs snapshot safely, use kali-tweaks for experimental paths, modernize legacy lists, add third-party repos with Signed-By, enable deb-src, pick mirrors, and troubleshoot common apt repository errors. Does not cover compiling the full Kali ISO or hosting a private mirror. |
| Related guides | Install Tor Browser on Kali Linux Install DVWA on Kali Linux Install a .deb package on Kali Linux apt command in Linux Ethical hacking tutorial |
Kali Linux pulls tools through apt repositories hosted by the Kali project. On current rolling images the mirror definition lives in a deb822 file under /etc/apt/sources.list.d/, not in a long /etc/apt/sources.list one-liner from older tutorials.
This guide shows the live repository file on Kali Rolling 2026.2, explains each field, compares branches, and walks through safe third-party additions and common apt update failures. Every command output below was captured on a default Kali rolling install with only kali.sources present.
What are Linux repositories on Kali?
A repository is the package index apt downloads when you refresh indexes or install software. sudo apt update reads every enabled source stanza, fetches InRelease metadata from the mirror, and builds the local package cache your install commands use.
Kali repositories are not interchangeable with Debian or Ubuntu suites. Both families use apt, but library versions, metapackages such as kali-linux-default, and security tooling builds target the Kali rolling branch. Mixing distro suites on one system is how you earn broken dependencies after the next upgrade.
Quick check — view the active Kali repository
Before you edit anything, confirm which branch and components your system already uses. On Kali 2026.2 the default stanza is a single deb822 file:
cat /etc/apt/sources.list.d/kali.sources# See https://www.kali.org/docs/general-use/kali-apt-sources/
Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/kali-archive-keyring.gpgThe Suites: kali-rolling line is the branch. Components lists every archive slice apt merges into one index. Signed-By pins verification to the Kali archive keyring instead of trusting every key in the global trusted keyring.
Many fresh installs no longer ship /etc/apt/sources.list:
test -f /etc/apt/sources.list && echo present || echo missingmissingWhen the file is missing, /etc/apt/sources.list.d/kali.sources is the only Kali mirror definition you need for a stock rolling system.
Confirm apt actually indexes that branch after your next refresh:
sudo apt updateWARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://http.kali.org/kali kali-rolling InRelease
Reading package lists...
Building dependency tree...
Reading state information...
816 packages can be upgraded. Run 'apt list --upgradable' to see them.The Hit:1 … kali-rolling InRelease line proves apt reached the rolling suite on http.kali.org. The upgrade count varies by image age and is not an error by itself.
Prove a installed package resolves from that same branch:
apt-cache policy nmapnmap:
Installed: 7.99+dfsg-1kali1
Candidate: 7.99+dfsg-1kali1
Version table:
*** 7.99+dfsg-1kali1 500
500 http://http.kali.org/kali kali-rolling/non-free amd64 Packages
100 /var/lib/dpkg/statusThe 500 … kali-rolling/non-free origin line ties the installed Nmap build to the rolling non-free component. If your policy output shows only Debian or Ubuntu URLs, fix sources before you chase package names.
Compare deb822 vs legacy one-line repository formats
Kali and Debian moved default installs to deb822 .sources files. Older guides still show one-line deb entries in /etc/apt/sources.list. Both describe the same mirror; the layout changed.
| Aspect | deb822 (*.sources) |
Legacy one-line (sources.list) |
|---|---|---|
| Location | /etc/apt/sources.list.d/kali.sources |
/etc/apt/sources.list or *.list snippets |
| Branch field | Suites: kali-rolling |
suite name after the URI |
| Components | Components: main contrib … |
trailing words on the deb line |
| Signing | Signed-By: /usr/share/keyrings/… per stanza |
often global /etc/apt/trusted.gpg.d |
| Readability | multi-line, one stanza per file | dense single lines |
| Kali 2026.2 default | yes | often absent |
Equivalent definitions for rolling:
Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/kali-archive-keyring.gpgLegacy one-line form (reference only — do not duplicate if kali.sources already exists):
deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmwareField map for either format:
| Field | Meaning on Kali |
|---|---|
Types / deb |
binary packages (deb-src adds source indexes) |
URIs / mirror URL |
Kali redirector http://http.kali.org/kali/ |
Suites / suite name |
branch (kali-rolling, kali-last-snapshot, …) |
Components |
archive slices: main, contrib, non-free, non-free-firmware |
Signed-By |
keyring file apt must use to verify the mirror |
apt reads both styles when enabled. Duplicate stanzas for the same suite can create confusing apt-cache policy output, so keep one authoritative Kali stanza.
Understand Kali repository branches
Kali publishes several branches (suites). Only one primary branch should be active in kali.sources for day-to-day use.
| Branch (Suites value) | What it delivers | Who should use it |
|---|---|---|
kali-rolling |
Continuous updates; default rolling image | Most labs, coursework, and daily Kali installs |
kali-last-snapshot |
Frozen snapshot aligned to a point release | Reproducible environments and regression baselines |
kali-experimental |
Packages under wider testing | Testers who accept breakage |
kali-bleeding-edge |
Newest builds before wider promotion | Advanced testers only |
kali-dev |
Developer integration branch | Kali contributors, not general pentest VMs |
kali-experimental receives work staged from kali-bleeding-edge, but it is still a testing branch — not a stability upgrade path. Stay on kali-rolling unless you have a documented reason to move.
Official branch notes live on Kali branches documentation and Kali apt sources.
Switch between rolling and last snapshot
Branch changes edit the Suites line (or the suite token on a legacy deb line), then require a full index refresh and upgrade. Work on a snapshot or backup first; moving branches changes hundreds of package versions.
Preview a snapshot switch without writing the file yet:
sed 's/kali-rolling/kali-last-snapshot/' /etc/apt/sources.list.d/kali.sources# See https://www.kali.org/docs/general-use/kali-apt-sources/
Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-last-snapshot
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/kali-archive-keyring.gpgThat sed command only prints a preview when you run it without -i. To apply the change:
sudo sed -i 's/kali-rolling/kali-last-snapshot/' /etc/apt/sources.list.d/kali.sourcesAfter any branch edit, refresh indexes and upgrade installed packages so versions match the new suite:
sudo apt update
sudo apt full-upgradeReturn to rolling by reversing the suite name:
sudo sed -i 's/kali-last-snapshot/kali-rolling/' /etc/apt/sources.list.d/kali.sources
sudo apt update
sudo apt full-upgradeRe-read Suites before you install new tools. A half-switched system is a common source of Candidate: (none) errors in ethical-hacking labs.
Use kali-tweaks for experimental branches
For kali-experimental and kali-bleeding-edge, Kali ships kali-tweaks instead of asking everyone to hand-edit branches. The package is installed on the 2026.2 image used here:
apt-cache policy kali-tweakskali-tweaks:
Installed: 2026.2.0
Candidate: 2026.2.0
Version table:
*** 2026.2.0 500
500 http://http.kali.org/kali kali-rolling/main amd64 Packages
100 /var/lib/dpkg/statusLaunch it from a desktop session terminal (not over a bare SSH session without TTY support):
kali-tweaksUse the repository or branch controls inside kali-tweaks to enable experimental feeds, then run sudo apt update when the tool finishes. Prefer this path over copying forum one-liners into kali.sources when you only need temporary access to testing packages.
Modernize a legacy sources.list
If an old image still has one-line deb entries in /etc/apt/sources.list or *.list snippets, convert them to deb822 before you add more files. Debian and Kali provide:
sudo apt modernize-sourcesThe command rewrites eligible legacy entries into .sources stanzas and disables the old lines so apt does not read duplicates. Run it once, then inspect results:
grep -r . /etc/apt/sources.list.d/On a clean 2026.2 rolling VM with only kali.sources, there is nothing to modernize — skip the command unless you imported an older sources.list from backup.
Add non-Kali repositories safely
Third-party tools (commercial VPN clients, vendor SDKs, signed desktop apps) sometimes need an extra apt source. Treat each vendor as its own deb822 file under /etc/apt/sources.list.d/, never mashed into kali.sources.
Safe pattern:
- Import the vendor key into
/usr/share/keyrings/vendor-archive-keyring.gpg(or the path their docs specify). - Create
vendor.sourceswithSigned-Bypointing at that keyring. - Keep the Kali
Suitesonkali-rolling(or your chosen branch) inkali.sources. - Do not add Ubuntu
jammyor Debianbookwormsuites to a Kali system.
Example deb822 skeleton (replace URI, suite, and key path with vendor values):
Types: deb
URIs: https://vendor.example/linux/apt
Suites: stable
Components: main
Signed-By: /usr/share/keyrings/vendor-archive-keyring.gpgAfter adding the file:
sudo apt updateFix NO_PUBKEY or Signed-By errors before you apt install from the new repo.
Enable source packages (deb-src)
Most pentest workflows only need binary deb indexes. When you plan to apt source or build Debian packages locally, add deb-src to the Types line in kali.sources:
Types: deb deb-src
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/kali-archive-keyring.gpgLegacy equivalent:
deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmwareSource indexes are larger and slow apt update slightly. Remove deb-src again if you do not compile packages.
Mirrors and repository selection
Kali publishes mirrors worldwide. The default URIs: http://http.kali.org/kali/ redirector picks a nearby mirror automatically, which is why you often see http://kali.download/kali in apt update output after redirects.
Practices that keep mirrors maintainable:
- Leave the redirector in place unless your organization documents a required mirror.
- Avoid hardcoding a geographic mirror in course materials; mirrors move or retire.
- Prefer
Signed-Byover disabling signature checks when a mirror misbehaves. - Use HTTPS mirrors when policy requires it, but HTTPS does not replace signature verification.
If apt update fails only on one mirror, retry after a few minutes or switch to another official Kali mirror listed on the project site.
Troubleshoot APT repository errors
When installs fail before a package downloads, the repository layer is often the root cause. Start with sudo apt update and read the first error line.
| Symptom | Likely cause | Fix |
|---|---|---|
Unable to locate package |
Stale indexes or wrong branch | sudo apt update; apt-cache policy pkg — confirm kali-rolling origin |
Candidate: (none) |
Disabled Kali repo or foreign suite | Restore kali.sources; remove conflicting bookworm/jammy lines |
Missing Release file |
Wrong URI path or dead mirror | Fix URIs; retry redirector http://http.kali.org/kali/ |
NO_PUBKEY / unsigned repo |
Missing or wrong Signed-By |
Install vendor keyring; match path in the .sources file |
EXPKEYSIG / expired Release |
Old image or clock skew | sudo apt update after ntp sync; upgrade kali-archive-keyring |
404 Not Found on InRelease |
Typo in suite or retired mirror | Correct Suites; use current Kali docs |
Duplicate version lines in apt-cache policy |
Two stanzas for same suite | Remove duplicate .list / .sources entries |
Some index files failed to download |
Network, proxy, or DNS | Test curl -I http://http.kali.org/kali/; fix proxy env vars |
| CD-ROM source enabled | Offline install media entry left on | Comment deb cdrom: lines in legacy lists |
| Mixed Debian and Kali packages | Foreign distro repo enabled | Disable non-Kali suites; sudo apt full-upgrade on Kali only |
| Held packages after branch switch | Pin or apt-mark hold |
apt-mark showhold; resolve holds before full-upgrade |
| Wrong architecture in foreign repo | arch=amd64 mismatch on arm64 |
Match [arch=…] options to dpkg --print-architecture |
kali-tweaks TTY errors over SSH |
Non-interactive shell | Run from desktop terminal or full TTY session |
Old tutorial still edits sources.list |
File absent on new images | Edit kali.sources instead |
References
- Kali apt sources
- Kali branches
- Debian deb822 sources format
- apt manual
Summary
Modern Kali Rolling stores its default mirror in /etc/apt/sources.list.d/kali.sources using deb822 fields: Types, URIs, Suites, Components, and Signed-By. The active branch is the Suites value — usually kali-rolling. Switch to kali-last-snapshot only when you need a frozen baseline, then run apt update and apt full-upgrade. Add third-party repositories as separate signed .sources files, modernize legacy one-line lists with apt modernize-sources when needed, and keep Debian or Ubuntu suites off a Kali disk unless you are deliberately building a broken lab for repair practice.

