[Solved] E: Unable to locate package in Kali Linux

Like other Linux distribution Kali Linux also needs a dedicated source to download and install the packages we need. By default, Kali Linux doesn't come with the necessary source links.

We need to manually put the list of sources from where we want to install our required packages. If there is no sources list or bad sources list on the Linux system it will result in 'E: unable to locate package' error.

E: unable to locate package

This problem may comes due to bad internet connection. If the internet connection is not the problem then it might because for the wrong repository. We will solve this problem by going through the processes explained in this article.

First we need to go to our Kali Linux's computer File system and navigate to etc/apt folder.

Right-click on the 'sources.list' text file and open it with any text editor.

editing sources.list
editing sources.list on mousepad
Delete if there is anything already wrote on the text file. Then copy and paste following lines there.

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

Then save and close it.

kali repository sources.list

There is another way to do it more easily. We can use a single command to do all these works. We just need to open a terminal and run the following command:

echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list

This command may ask the super user password (SuDo password) of the Kali Linux machine and fix the repository.

Now we need to update the system by using following command:

sudo apt-get update
Now it will start update and after update our problem is fixed.

So this is the most simple way to fix unable to locate package in Kali Linux.

Fix slow update/upgrade or install in Kali Linux

It will work for everyone if not then please comment down below. For more tutorial on Kali Linux visit our blog regularly and follow us on Twitter an Medium for quick update.


  1. thank you so much to solve my problem ....it really helps

  2. You are a life saver. Thanks it worked so well.

  3. It didn't work Im on windows 10 unactivated

  4. Replies
    1. Not working? can you please explain the problem?


Please do not spam here. It is comment box not a spambox. Promotional links are not allowed.

Powered by Blogger.