How to fix sources.list file on Kali Linux

The sources.list file issue often appears after updating Kali Linux. Today's article will show you how to edit sources.list file on Kali Linux.

The sources.list file issue often appears after updating Kali Linux. Today's article will show you how to edit sources.list file on Kali Linux.

Fix the default repository

First, after installing a new Kali Linux completely, sources.list counte only the repository is

 123 ## Regular repositories 
deb http://http.kali.org/kali potassium main non-free contrib
deb http://security.kali.org/kali-security potassium / updates main contrib non-free

If you try, it can update some applications, but if you try to install a new application, it will not be possible to 90% and a message like this will appear:

 E: Unable to locate package 

How to fix sources.list file on Kali Linux Picture 1

The easiest way is to edit /etc/apt/sources.list

Remove or comment each line with # in front and add the following line in the terminal window:

 leafpad /etc/apt/sources.list 

After this command line, the screen will appear:

How to fix sources.list file on Kali Linux Picture 2

Now, remove the old command line and add a new one.

Repo for Kali Linux versions

  1. For Kali Linux 1.x users, use the repo below:

(Don't update Kali 1.0, upgrade to Kali 2016 instead).

 123456 ## Regular repositories 
deb http://http.kali.org/kali potassium main non-free contrib
deb http://security.kali.org/kali-security potassium / updates main contrib non-free
## Source repositories
deb-src http://http.kali.org/kali potassium main non-free contrib
deb-src http://security.kali.org/kali-security potassium / updates main contrib non-free
  1. For Kali Linux 2.0 - Kali Sana, use the repo below:

(You can still get updates for Kali Sana but not for long. So upgrade to Kali 2016.1)

 123456 # Regular repositories 
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana / updates main contrib non-free
# Source repositories
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
  1. For Kali Linux 2016 - Kali Rolling, use the repo below:
 123deb http://http.kali.org/kali potassium-rolling main contrib non-free 
# For gói nguồn truy cập, uncomment theo sau dòng
# deb-src http://http.kali.org/kali potassium-main contrib non-free
  1. With Kali Linux 2017.1 sources.list use the following repo:
 1deb http://repo.kali.org/kali potassium-rolling main non-free contrib 

Finally, save and close the file.

Install new, update and upgrade your Kali installation

Use the following command:

 1apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y 

Kali Rolling Repository

In contrast to dev-potassium, potassium-rolling is expected to be of better quality because it is managed by a tool that ensures the installation capability of all packages contained therein. This tool will select packages that are updated from the dev-command and copy them into potassium-rolling only if they have been verified to be installable.

If you still have any questions about updating, read the article How to update Kali Linux and fix errors when updating.

See more:

  1. How to scan websites for potential security vulnerabilities with Vega on Kali Linux
  2. How to install Kali Linux on Android using Linux Deploy
  3. Kali Linux commands from AZ and commonly used commands
4.1 ★ | 142 Vote | 👨 30783 Views
« PREV POST
NEXT POST »