So you may notice that after installing Kali Linux whenever you try to install some new packages and use apt-get install command there was an error “ E : Unable to Locate Package” and the command is not working. This error occurs generally due to the repository error i.e. “sources.list” file is either blank or is setup with a dead repository.
To fix this error follow these steps:
Open sources.list file by command: #atom /etc/apt/sources.list
Here you need to remove the entry as this causes a broken Kali Linux installation. Apt uses this file /etc/apt/sources.list that lists the ‘sources’ from which packages can be obtained. This file is need to be edited with some either CLI editor or text editor.
Here there are two repositories that you need to edit.
First copy the sources repositories
Then copy regular repositories
Paste these two entires in source.list file and save it
Exit the editor
Go to terminal and update the packages with the command: #apt-get update
Now try to install any package
The error has been fixed successfully and now any package can be installed easily.