How to Fix apt-get install / update Not Working in Kali Linux 2020.3

Have you just installed Kali Linux in VirtualBox and tried running the commands apt-get install or apt-get update and it’s not working? Here is the solution or fix for it, very easy!

This problem might likely be caused by a lack of internet connection in your Kali Linux virtual machine. So let’s, first of all, be sure it’s not your internet connection. 

Open a terminal window and type “ping”.

ping to test internet connectivity

If your terminal output is similar to the screenshot above then your internet connection is ok, continue with this post otherwise fix it using the instructions here.

Secondly, it might be that your time and date is out of sync with the host OS if you’re running a Virtual Machine. Probably because you’re restoring the VM from a snapshot, in which case you want to use the command below to fix that.

sudo service ntp restart

If this also fails then continue reading for the ultimate solution 🙂

FIX: apt-get Not Working in Kali Linux 2020.3 and Beyond

Watch this video to fix it or continue with the written steps, either way you will fix this very easily.

It’s a minor problem that occurs when your Kali Linux repository ‘sources.list‘ file is empty for some weird reason.

Your terminal will throw up an error similar to the one in the screenshot below when you try to either update or install any program. Here is how to fix that easily.

apt-get not working

Open a terminal window and follow the below instructions:

Step 1: Type the code below in a terminal

sudo nano /etc/apt/sources.list
sources.list empty in kali linux

Step 2: Navigate with the down arrow key on your keyboard to the bottom of the page and type in the official Kali Linux repository source.list address.

deb kali-rolling main non-free contrib
official kali linux sources.list repository configured

Step 3: Press “Ctrl + X” key on your keyboard to exit. Press “Y” key for yes, and “Enter” key to confirm. (Note: the Ctrl key you should use is the one on the left side of your keyboard)

Step 4: Now test that you can now update and install programs.

apt-get working

Alright, that’s all for fixing apt-get not working in Kali Linux.

 If you face further issues relating to GPG Keys when you try to install programs, follow the instructions in this post to renew/update your GPG keys.

As usual, if you have any queries, ask them in the comments and I’ll get back to you ASAP. In the mean time, you should check these recommended posts below.

Please help share this post if you found it useful!

4.3 6 votes
Article Rating
Notify of
Newest Most Voted
Inline Feedbacks
View all comments

Hi I followed the steps above in my Kali2019 instance running on VM workstation, but upon running the apt update I get the E: The repository kali-rolling Release does not have a release file

Excellent article. Keep posting such kind of information on your blog.
Im really impressed by it.
Hi there, You’ve done an incredible job. I will certainly
digg it and individually recommend to my friends.
I am confident they’ll be benefited from this website.


Very good i really appreciate

Son Çıkan Kitap Yorumları En Hızlı Kitap Siparişi


Thanks a lot brother …
You solved my problem very easily…


tnxits solved many problems of my system

aarav kandara

heya mann
i am just one of the folks tryna become an ethical hacker..i am just a newbie tho
could you please help me install mitmf (man in the middle) in kali cos i’m facing difficulties and i’ll appreciate any help from your side 😀


Great article it helped me fix my kali not updating

malik Tayyab

very helpfull thanx

Would love your thoughts, please comment.x