Sudo apt update is too slow in Kali linux :( Solution here

Devender Rao
3 min readApr 6, 2022

Hi All,

Have you ever trying run a tool but it needs some extra dependencies to run perfectly . Also it recommend to “sudo apt update” before installation of new tools .

Story behind this :-

I was playing a CTF and stuck with some tools which are missing in my machine so I run “sudo apt update” , And speed was too slow :/

I was having good Internet connection with approx 20–30Mbps speed, but what I was getting at that time i.e 100–200Kbps . So I tried to change the Internet source , with Mobile data it was giving the same . No major change in speed . Now this time is to read docs , I visit Kali — linux official page to https://www.kali.org/docs/ to solve this issue and find the mirror list .

I was trying one by one that which mirror gives me best result . By this , I got an idea to make and script which automatically fetch the list of mirror that are near me and try to find which is best in speed and perfect with my location .

Before :-

After my script run and the Result were awesome :), You can see that it completed in just 5 sec as compare to before it was showing 2–3minutes.

I love Open source community and also want to contribute in it . So I think might others also facing the same issue and have to try which mirror gives best speed in their region and decide to make an script for this .

Result :-

I made this script to solve issue for other users, who face speed issue while updating , upgrading or installing tools in Kali Linux Machine.

How to Use ?

You have to just enter this command in your terminal and script will do its work in background ;)

curl -sL https://tinyurl.com/flash-repo | sudo bash

Thanks :)

--

--