How to fix Update issue and Sources.list Repositories in Kali Linux

Fix Kali-Linux Network Repositories

Do you face problem updating your Kali Linux? Or you don't actually see an error but still are not able to update or upgrade it? Do you see something like the below screenshot when you try updating and/or upgrading your Kali Linux?

If YES, keep reading. And I can assure you that you'll be able to update and upgrade your Kali Linux very soon.

There might be chances when you've just installed a fresh copy of Kali but are still not able to update/upgrade it. I, personally, have faced this a lot of time. And so thought of writing an article about it. Without wasting much time, let's begin.

First of all, browse to /etc/apt/ and open the file 'sources.list'.

(Hint: Use this command to edit the file - vi sources.list)

This is how the file looks like -

When the file opens, press 'i' to enter the Insert mode to be able to add/delete any content.

Now, what you need to do is, just add the below two network repositories to the file. What this does is, it allows the Linux distribution to check for any update/upgrade from the official server and update your machine.

deb kali-rolling main non-free contrib
deb-src kali-rolling main non-free contrib

Next, when you're done adding both the repositories, press 'esc' and then type ':wq' to save the exit the file and come back to the command prompt. When you type the above command, you'll be able to see something like the below screenshot -


Now, you'll be able to update and/or upgrade your old Kali Linux distribution. Just run the below command -

'apt-get update'

Next, when you're done updating. You need to upgrade by executing the below command -

'apt-get upgrade'

You can run this command to update & upgrade in one single command -

'apt-get update -y && apt-get upgrade -y'

Hope, this was helpful. And if you faced any problem, kindly drop a comment and I'll be happy to help you.

Next Post »

Subscribe to our mailing list

* indicates required
Select your Interested Topics.