Pages

fix-kali-linux-apt-get-slow-update

How to fix Kali Linux apt-get slow update?
To fix this, you need to check a few things:
  1. Check if you have the right repositories is your /etc/apt/sources.list
  2. Remove unwanted or unsupported repositories.
  3. Clean apt-get cache.
  4. Choose a fast DNS server.
To fix sources.list, follow this guide: How to add official Kali Linux Repositories?
To switch repositories to a different mirror of your choice, follow this guide: How to change repositories to a different mirror?

Clean apt-get cache:

apt-get clean

Choose a proper DNS server:

Edit resolv.conf file:
leafpad /etc/resolv.conf

Enter Google DNS nameservers

Following two are Google DNS, let’s face it, if Google is broken, we all think Internet is broken. Hence the reason of using Google DNS. You can choose other DNS Server if you want that are fast and reliable.
nameserver 8.8.8.8
nameserver 8.8.4.4
Now save and close the file.

Test your changes

Let put our changes to the test..

Step1

apt-get update

Step2

apt-get upgrade

Step3

apt-get dist-upgrade
That’s it, you’re set.if you want to know more details click here

Another solution, changing from HTTP to REPO in sources.list file(14/02/2014)

One of the readers advised that by changing the repositories from HTTP to REPO, he gained significant speed up. 
Use the following repositories (update your sources.list file)
## Kali Regular repositories
deb http://repo.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://repo.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
Instead of
## Kali Regular repositories
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
This change seems to boost speed as it uses slightly different repo than the usual HTTP servers which are overloaded. Let us know how this worked for you.
In case your sources.list file is messed up or you’re just not sure, what to put on there, follow these instruction’s to add official Kali Linux Repositories.
(Note: The above mentioned repositories are a slightly variant of the official one, you can choose either as they are both from Kali.org)
In case your DNS server is picking up (even Google’s DNS server) a repository from a different country(or avoid a specific country) and you would like to manually switch repositories to a different mirror of your choice(say in same country or just something you know working faster, follow these instruction to change repositories to a different mirror.

No comments:

Post a Comment