How to add official Kali Linux Repositories?

This is a small guide on how to add official Kali Linux Repositories – I’ve updated it to include all versions of Kali Linux till date i.e. Kali 1.x, Kali 2.0/Kali Sana and Kali Rolling. How to add official Kali Linux Repositories – Kali Linux 2.x Sana repositories - blackMORE-Ops

The single most common causes of a broken Kali Linux installation are following unofficial advice, and particularly arbitrarily populating the system’s sources.list file with unofficial repositories. The following post aims to clarify what repositories should exist in sources.list, and when they should be used.

Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.

Edit your sources.list

The easiest way is to edit the /etc/apt/sources.list

root@kali:~# vi /etc/apt/sources.list
(or)
root@kali:~# leafpad /etc/apt/sources.list

Add official repo’s only:

Copy paste the following repositories (remove existing lines or you can comment them out – your take). Following repo list was taken from official Kali sources.list Repositories page:

The Kali Rolling Repository

Kali-Rolling is the current active repository since the release of Kali 2016.1 and 2016.2. Kali Rolling users are expected to have the following entries in their sources.list:

deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free

Save and close the file.

Retired Kali Sana (Kali 2.0) Repositories

For access to the retired Kali Sana or Kali 2.0 repositories, have the following entries in your sources.list:

deb http://old.kali.org/kali sana main non-free contrib
deb-src http://old.kali.org/kali sana main non-free contrib

Save and close the file.

Retired Kali moto (1.0) Repositories

For access to the retired moto repositories, have the following entries in your sources.list:

deb http://old.kali.org/kali moto main non-free contrib
deb-src http://old.kali.org/kali moto main non-free contrib

Save and close the file.

OLD Instructions (Kali 1.0 – does not work anymore)

I’ve kept these for historical purpose only, these repo’s worked on Kali 1.x (2013 – 2015). Do no follow these anymore.

# Regular repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
# Source repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

Clean your apt-get

apt-get clean

Do an apt-get update

apt-get update

Do an upgrade

apt-get upgrade

Finally do a distribution upgrade

apt-get dist-upgrade

That’s it, you’re set.

Conclusion

Despite what many unofficial guides instruct you to do, avoid adding extra repositories to your sources.list files. Don’t add kali-dev, kali-rolling or any other Kali repositories unless you have a specific reason to – which usually, you won’t. If you must add additional repositories, drop a new sources file in /etc/apt/sources.list.d/ instead. [Source: Offensive Security Blog]

If you must, (despite warning many users will be tempted), do try it in a VirtualBox/VMWare first and take snapshots so that you can roll back. Kali updates are quite big and takes a lot of time to download and their DVD ISO’s are not very up to date. You can build your own custom updated ISO by following these instructions and keep using that offline.

Thanks for reading. If I have made a mistake, please correct me.

Check Also

The following signatures were invalid EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository - blackMORE Ops -3

The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository

I just tried to update one my Kali Virtual Machine and received the following error: …

Building an updated Kali Linux ISO - blackMORE Ops -4

Building updated Kali Linux ISO

Are you tired of downloading Kali Packages every-time you re-install? Kali Linux 2016.1? I know …

42 comments

  1. Apt-get update is giving 404 not found error

    • Many of those. I’m guessing it’s just down for the day?

    • if you have 404 error like me, it means mostly that you are using the old repositories. to fix this:
      1/you need to comment the old repositories using # at the first of their lines; so that apt-get uses only the new repositories not the old ones.
      2/do the tutorial steps, it should work for you.

  2. Have any idea how to solve the :

    Failed to fetch http://security.kali.org/kali-security/dists/sana/updates/main/binary-amd64/Packages Cannot initiate the connection to mirrors.netix.net

    It seems it connects to an ipv6 address even if i disabled the ipv6 in sysctl and what is stranger is that i have inet6 address on my interface.

  3. i forgot to do the apt-get clean
    will i face any problem ?

  4. I get an error when i upgrade kali 1.1.0 from 2.0.
    Please give me and Advice…Thanks…../

    The following packages will be upgraded:
    kali-menu
    1 upgraded, 0 newly installed, 0 to remove and 1372 not upgraded.
    424 not fully installed or removed.
    Need to get 4,016 kB of archives.
    After this operation, 4,820 kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://http.kali.org/kali/ sana/main kali-menu all 2.3 [4,016 kB]
    Fetched 4,016 kB in 4min 29s (14.9 kB/s)
    Reading changelogs… Done
    (Reading database … 325998 files and directories currently installed.)
    Preparing to replace kali-menu 1.371.1 (using …/archives/kali-menu_2.3_all.deb) …
    Unpacking replacement kali-menu …
    dpkg: error processing /var/cache/apt/archives/kali-menu_2.3_all.deb (–unpack):
    trying to overwrite ‘/usr/share/icons/hicolor/48×48/apps/wireshark.png’, which is also in package wireshark 1.10.2-1~bpo70+1
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
    /var/cache/apt/archives/kali-menu_2.3_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@blackHat:~#

    • I got the same error.. Try this..
      go to console CTRL+ALT+F2 .. run apt-get clean apt-get upgrade with root privileges ..
      Come back to gnome and run apt-get dist-upgrade with sudo ..

      Hopefully the error goes away
      verify with lsb_release -a.. should show Kali 2 sana

  5. hey how to go to console and then to gnome

  6. i m also getting this error:

    I get an error when i upgrade kali 1.1.0 from 2.0.
    Please give me and Advice…Thanks…../

    The following packages will be upgraded:
    kali-menu
    1 upgraded, 0 newly installed, 0 to remove and 1372 not upgraded.
    424 not fully installed or removed.
    Need to get 4,016 kB of archives.
    After this operation, 4,820 kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://http.kali.org/kali/ sana/main kali-menu all 2.3 [4,016 kB]
    Fetched 4,016 kB in 4min 29s (14.9 kB/s)
    Reading changelogs… Done
    (Reading database … 325998 files and directories currently installed.)
    Preparing to replace kali-menu 1.371.1 (using …/archives/kali-menu_2.3_all.deb) …
    Unpacking replacement kali-menu …
    dpkg: error processing /var/cache/apt/archives/kali-menu_2.3_all.deb (–unpack):
    trying to overwrite ‘/usr/share/icons/hicolor/48×48/apps/wireshark.png’, which is also in package wireshark 1.10.2-1~bpo70+1
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
    /var/cache/apt/archives/kali-menu_2.3_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@blackHat:~#

  7. i am not able to remove the error after going through
    the given method

  8. I had the same problem, here is how i solved it ->

    apt-get install synaptic
    in your terminal, launch synaptic by typing “synaptic” and pressing “Enter”
    in synaptic, go to “missing recommended packages” tab, it will throw an error that “the following packages need to be removed, mark them for removal before proceeding?”, you need to mark them for removal and from the “package” tab apply the marked changes. It will remove the obsolete packages (metasploit, wireshark, kali-menu) and install the upgrades of these tools.
    relax :D

    l3s7r0z

  9. W: GPG error: http://repo.kali.org kali-bleeding-edge Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400
    W: There is no public key available for the following key IDs:
    7638D0442B90D010
    W: GPG error: http://security.kali.org sana/updates Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400
    W: GPG error: http://http.kali.org sana Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400
    W: GPG error: http://security.kali.org kali/updates Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400
    W: Failed to fetch http://repo.kali.org/kali/dists/kali-bleeding-edge/maindeb/binary-amd64/Packages 404 Not Found

    W: Failed to fetch http://repo.kali.org/kali/dists/kali-bleeding-edge/http://ftp.fr.debian.org/debian/binary-amd64/Packages 404 Not Found

    W: Failed to fetch http://repo.kali.org/kali/dists/kali-bleeding-edge/wheezy/binary-amd64/Packages 404 Not Found

    E: Some index files failed to download. They have been ignored, or old ones used instead.
    friends I have following erorrs can Any one tell me way to solve

  10. 1922 upgraded, 823 newly installed, 65 to remove and 1 not upgraded.
    Need to get 2,537 MB of archives.
    After this operation, 1,735 MB of additional disk space will be used.
    E: You don’t have enough free space in /var/cache/apt/archives/.

  11. Everything works fine no errors whatsoever great job blackmoreops

  12. everything is cool man thank you

  13. Cannot install Many softwares on kali linux like google chrome etc.

  14. Guys,

    @Abubakr – Kali is not designed to be your every day OS – It’s meant for penetration testing, vulnerability assessments etc. Also, unless Google Chrome came out with a .deb package (which they hadn’t up until a few months ago) The only option is Chromium, which has many dependencies. If your not adept using and troubleshooting linux issues I suggest you use Iceweasel (which is a forked FireFox)

    @kashif Zeb – Your keyring has expired for those repos. Try running these commands (make sure you are root)
    rm -rf /var/lib/apt/lists
    apt-get update
    apt-get install kali-archive-keyring

    Then run a apt-get clean. Then you should be good to update your repo and OS.

  15. guys i am tryig to install Metasploit on Kali 2.0. can some one guide me .

  16. I read software-center is not supported in Kali2.0 is they anyother smilar too to insatall pakages ?

  17. hey guys dont know what im doing wrong but my sources.list is exactly what it says and did the upgrading……so i reboot and at the login screen im able to select “Mate” and so i login as root user and it brings me to the same Gnome desktop??????after the updating i used
    apt-get install mate-core mate-desktop-environment-extra mate-desktop-environment-extras……plz help thanx…cheers!

  18. Sorry, new to Linux, so to open the tools Kali Linux apt has installed, do i still use kalitoolin? or what command do I call or is it within the linux mint commands already?

  19. Thanks for the offical repos list. It really helped me to install updates on my Kali Linux.

  20. Thanks you saved my ass

  21. excelent. thanks dude

  22. Thanks for your work and advice :)

  23. how can i fix this …. please help me

    W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)

    E: Some index files failed to download. They have been ignored, or old ones used instead.

  24. thanks alot for tutorial, it is workr for me in kali rolling 2016.

  25. Thank you for your tutorial, it works for me!

  26. i typed apt-get upgrade
    pressed y to continue but then it says “could not resolve http:kali.org
    help please

  27. One thing I want to say just one thing GREATTTTTTT. I tried many websites andblog but only this works for me .great job brother

  28. Please update the article.

  29. alert(“alert”)

  30. issue in upgrade kali 2018 ……showing entries were disabled at end of installation

  31. oi good

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.