Tricks & How To's

Fixing Update Errors and Updating Official Repositories in Kali Linux

Have you installed Kali Linux and are experiencing issues whilst updating your repositories? Don’t worry this tend to be a common issue on Kali.

Warning: unofficial repositories can hold a risks that could effect your system use official and trusted repositories only using third party repositories could compromise or brake your system in the process.

First of all we need to locate and open up our Sources.list file. This file stores our Repository sources.

You can find Sources.list file at the following location.

/etc/apt/sources.list

Below is a list of current and prior Kali Linux Repositories choose what repository matches the version of your Kali Linux operating system.

I’m using Kali Linux 2017.1 so I will be using Kali Rolling repository. If you are using any version of Kali Linux from 2016 upwards you will need to use the Kali rolling repository.

Kali Rolling Repository

deb http://http.kali.org/kali kali-rolling main contrib non-free
 # For source package access, uncomment the following line
 # deb-src http://http.kali.org/kali kali-rolling main contrib non-free

Kali sana (2.0) Repositories

deb http://old.kali.org/kali sana main non-free contrib
 # For source package access, uncomment the following line
 # deb-src http://old.kali.org/kali sana main non-free contrib

Kali moto (1.0) Repositories

deb http://old.kali.org/kali moto main non-free contrib
 # For source package access, uncomment the following line
 # deb-src http://old.kali.org/kali moto main non-free contrib

So now you know what sources you are working with open Sources.list using the following command.

nano /etc/apt/sources.list

Now that we have Sources.list file open its time to add the new repositories. When opening Sources.list for the first time you will see something similar to the screen shot below.

These are left over sources from Kali Linux Live CD install. (This is normal and really common don’t worry I ensure you are not the only person having this problem.)

Now remove all lines from this list of sources. (Sources.list should be blank at this stage.)

Copy the lines of the sources that correspond with your Kali Linux repositories version and paste then in to the Sources.list. Since I’m using Kali Linux 2017.1 I will use the following sources.

deb http://http.kali.org/kali kali-rolling main contrib non-free
 # For source package access, uncomment the following line
 # deb-src http://http.kali.org/kali kali-rolling main contrib non-free

Once your happy with your source list save it using Ctrl+O in nano editor.

Now open up a terminal and use the command below to update the source list. This command will clean previous sources & update system source packages this will allow us to quickly and easily query Kali Linux repositories.

apt-get clean && apt-get update

Once the system has finished updating packages you should be able to install packages using apt-get install successfully.

If you are still having trouble understanding or still having trouble after following this guide don’t hesitate to leave us a comment.

 

 

To Top

Pin It on Pinterest

Share This