Fix “Unable to locate package” error in Kali Linux.


This issue “Unable to locate package” is basically related to Troubleshooting – Repository Issues in kali linux.

Always make sure your source.list file is correct.

Open /etc/apt/ using following command:

cd /etc/apt/

Open the sources.list file using your fav editor. I am using nano.

sudo nano sources.list

Now paste the following code at the last line of the file:
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
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
# For source package access, uncomment the following line
# 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
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 

Write and quit the file using CTRL+O and CTRL+X

Now just run:

sudo apt-get update

In any problem, let me know via comment.

Leave a Reply

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