Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gilzonme/faebd9c85fe9eeda1074902680b456f4 to your computer and use it in GitHub Desktop.
Save gilzonme/faebd9c85fe9eeda1074902680b456f4 to your computer and use it in GitHub Desktop.
Fix “Unable to locate package” error in Kali Linux.
This error is basically due to entries in the sources.list file.
Open /etc/apt/ using following command:
cd /etc/apt/
Open the sources.list file using:
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
Now your error is gone you can install any package
@gilzonme
Copy link
Author

gilzonme commented May 5, 2018

Any modifications comment please :) . Thanks!!!

@kerv94
Copy link

kerv94 commented Nov 21, 2020

ISSUES---->;verk@localhost:/etc/apt$ sudo nano sources.list
bash: nano: command not found
PLEASE HELP FIX! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment