[Solved] E: Unable to Locate Package in Kali Linux

unable to locate package

Many times when you install any pkg in your Kali Linux, you will get an error – “E: Unable to locate“.

Due to this error, you are unable to install your desired pkg on your computer and it can make problems for you during learning Kali Linux or penetration testing.

So today we will resolve a common issue which is – “E: Unable to locate in Kali Linux“. Even you can fix this problem in other operating systems.

So let’s get started !!

Solve Error: Unable to Locate Package in Kali Linux

The “E: Unable to locate package” error message in Kali Linux shows when the package you are trying to install is not found in the repository you are using. Here are a few things you can try to resolve this issue:

1: Update the Package Cache

maybe you got this error due to an older package cache, so you need to update your system cache, Even I’m suggesting that you update your entire system also by using the command and this command will update your system cache also.

sudo apt-get update && upgrade

2: Check Your Sources.list

Make sure that the repository you are trying to install the package from is correctly listed in your sources.list file. you need to edit it with either the CLI editor or the text editor. You can check to Edit sources.list, steps given below.

sudo nano /etc/apt/sources.list

3: Try a different repository

If the package is not available in the default Kali Linux repositories, try searching for it in other repositories. You can add a new repository to your sources.list file.

4: Install the package from the .deb file

If the package is not available in any repository, you can try downloading the .deb file from a trusted source and installing it using the dpkg command. If you want to know How to Install .deb package in Kali Linux then click on the link to read about .deb installation process.

5: Check if the package is available for your version of Kali Linux

Some packages may not be available for the latest version of Kali Linux. In this case, you may need to install an older version of the package or find an alternative solution.

Fix: Unable to Locate Package using source.list

If this similar problem is in your Kali Linux Machine, then I will show you how you can solve this error, the process step-by-step.

I can say that after reading this post, you will never have to face this problem on your computer. So follow the steps below.

  • Open File Application in Kali Linux
  • Then Go to the location computer/etc/apt/
  • Now you will see a file named “sources.list” Just open this file.
  • Remove your all code
  • Then copy the 3 lines of code given below and paste them into that file.
  • Save this file by pressing ‘Ctrl + S’
  • Open Terminal and don’t forget to use “sudo apt-get update“.

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

Solve This Error using the Terminal

Step: 1Open your Terminal.
Step: 2Type – ” nano /etc/apt/source.list ” and hit Enter.
Step: 3As you can see we have opened the “Sources.list” file.

(Unable to locate – This error is the repository issue you can see I don’t have any repositories in this sources.list, so we need to add the repositories.)

Step: 4Click the Link Given in Below and Download the repository.
Step: 5Click Me to Kali Linux Repository
Step: 6After opening the Link you can see, that we are on this page of Kali talks official documentation.
Step: 7Then find the ” Kali sources.list Repositories ” and click on that link.

Step: 8Now, we are on Kali sources.list repositories
Step: 9Then Copy the Command of ” Regular Repositories “.
Step: 10After the copy, of this command, come back to your terminal and paste it over here.
Step: 11After Paste this command hit Enter Two Time.
Step: 12Then Go to that Page Again and here we have these source repositories.
Step: 13Copy this “source repositories” command.
Step: 14Come back to the terminal and paste it here, but now do not need to hit Enter.
Step: 15So you can see repositories are now added.
Step: 16After that, you need to press the ” Ctrl + O ” key on the keyboard.
Step: 17Then hit Enter and it will save.
Step: 18For Exit these sources.list file just presses “Ctrl+X” on the keyboard.
Step: 19Now you can try to install any Pkg.

I can tell guarantee that now you will not get this error – “E: Unable to locate”. Still, if your problem is not fixed then you can join our community forum and ask about it from experts.

If you still have this problem or any other such problem, then you can tell me in the comment box.

And for this problem do not come to your friends, you can also share it with your friends.

Thank You!!

Pawan Chauhan

I'm a Web Developer and Software Trainer.

This Post Has 10 Comments

  1. betflix

    Hi there! I simply would like to give you a huge thumbs up for the excellent
    info you’ve got here on this post. I’ll be returning to your web site for more soon.

  2. elom

    (E: Unable to Locate Package in Kali Linux) is a popular error 🙂

  3. mooh

    I wanna personal classes, I will pay

  4. samly

    You are amazing…

  5. slot leci123

    Thanks a lot

  6. john

    Great Article, Now I solved my E: Unable to Locate Package Error.

  7. eulah

    Hi there, I enjoy reading through your post.
    I like to write a little comment to support you.

  8. floy

    Read These Three Tips I solved my error. Thank you

  9. Aluminium

    Right now it looks like Drupal is the best tech platform out there right now.
    (from what I’ve read) Is that what you’re using on your blog?

  10. Riskere

    Error: E: Unable to Locate Package solved successfully 🙂

Leave a Reply