How to check / restore Kali Linux Rolling Repository

It is highly recommended to keep Kali Linux Repository in original state. You and your Kali can avoid a lot of problems if you will not populate the system’s sources.list file with unofficial repositories.

Indeed, Kali needs only one line in the /etc/apt/sources.list file:

deb https://http.kali.org/kali kali-rolling main non-free contrib

You can open the file manually

sudo gedit /etc/apt/sources.list

Likely you'll see the default strings:

deb https://http.kali.org/kali kali-rolling main non-free contrib
# deb-src https://http.kali.org/kali kali-rolling main non-free contrib

Also you can use the complex command to test Kali Repository:

if cat /etc/apt/sources.list | grep -E "deb https://http.kali.org/kali kali-rolling main contrib non-free" || cat /etc/apt/sources.list | grep -E "deb https://http.kali.org/kali kali-rolling main non-free contrib"; then echo -e "\n\n\033[0;32mRepository is ok"; else echo -e "\n\n\033[0;31mRepository is not alright"; fi

If Kali Linux Repository have no necessary string, you’ll see message ‘Repository is not alright’.

You can restore Kali Linux Repository to original state by the command

echo -e "deb https://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list

Once you change the system’s sources.list file you should update information about available packages in the repositories:

sudo apt-get update

Continue reading:

Recommended for you:

One Comment to How to check / restore Kali Linux Rolling Repository

  1. Anonymous says:

    thanks for help

Leave a Reply

Your email address will not be published.

Please consider supporting this blog

Love the stuff I create? Please consider donating to help things rolling faster! miloserdov.org/?p=1460