The single most common causes of a broken Kali Linux installation are following unofficial advice, and particularly arbitrarily populating the system’s sources.list file with unofficial repositories.
The following post aims to clarify what repositories should exist in sources.list, and when they should be used.
Kali Repository
It’s not just Kali Linux. A Linux repository is a storage location from which your system retrieves and installs OS updates and applications. Each repository is a collection of software hosted on a remote server and intended to be used for installing and updating software packages on Linux systems
Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.
In Kali linux those repositories can be found in the file located at /etc/apt/sources.list
What should my sources.list look like?
Kali rolling users(kali 2018.x) should have these entries in their /etc/apt/sources.list 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
Checking your kali repositories & ensuring your Installation is updated
Sometimes your Kali linux only has two repositories added with extra comments (##) which gives you an Unable to locate package error.
Open file from path etc/apt/sources.list delete all the old once or existing once and paste the below one and save it.
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
Don’t add any additional repositories, it will BREAK YOUR KALI LINUX INSTALL.
To update list
apt-get update
To update the newer version of an existing software, run the following command
apt-get upgrade
To update the latest version of Kali linux, run the following command
apt-get dist-upgrade
or you can run all the command at once
apt-get update && apt-get upgrade && apt-get dist-upgrade