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.
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.
Delete if there is anything already wrote on the text file. Then copy and paste following lines there.
Then save and close it.
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:
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:
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.
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.
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.
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 on mousepad |
deb http://http.kali.org/kali kali-rolling main non-free contrib
Then save and close it.
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:
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:
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.