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 google.com”.

ping google.com 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 http://http.kali.org/kali 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.

What’s Next

 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. Also, do drop a comment if this post worked for you.

5 4 votes
Article Rating
Subscribe
Notify of
guest
7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Rohan

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 http://kali.org/kali kali-rolling Release does not have a release file

blog3004.xyz

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.

Darklord14

Very good i really appreciate

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

Nikhil

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

zeo

tnxits solved many problems of my system

7
0
Would love your thoughts, please comment.x
()
x
Scroll to Top