Kali Linux

How to Add Official Kali Linux Repositories?

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.

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.

Add Official Kali Linux Repositories

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

[email protected]:~# vi /etc/apt/sources.list
(or)
[email protected]:~# 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 How to add official Kali Linux repositories. If I have made a mistake, please correct me.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular

To Top