5 tips to fix slow apt-get update or upgrade on Kali Linux

Every Kali Linux user have faced slower internet speed's problem in apt-get update or apt-get upgrade or apt-get install with the official repository. Using unofficial repository is not safe for a user, we strongly recommended to use the official repository but it is very slow, it took hours to archive a major update or download a bigger tool, then How we can fix the slow apt-get update or upgrade in Kali Linux ?

fix slow apt-get update or upgrade on Kali Linux


In this tutorial we are going to cover the ways how we can fix apt-get update or upgrade on our Kali Linux system.

  1.  Good internet speed.

    Updating Kali Linux is a slower process then other internet tasks. If we have a slower internet then it will be more slow, so please maintain a decent network speed.
  2.  Choose a proper DNS server

    Check for Domain Name Server by using following command :

    sudo mousepad /etc/resolv.conf
    This command will open a window like following:

    kali default DNS

    Here we will add Google's Domain Name Server
                                         8.8.8.8
                                         8.8.4.4
    This will look like following:

    Google's name server

    Then we can save and close the config file.

    Then we can clean by using following command:

    sudo apt-get clean
  3. Check the right repository.

    We should check our repository by using following command:

    sudo mousepad /etc/apt/sources.list
     The screenshot of the command is following:

    kali linux official repository
     This server is usually overloaded by the users. But we should not try unofficial repositories that may break our Kali Linux system. See the #5 point to fix this.
  4.  Download via the http secure protocol

    We need to install a tool called apt-transport-https by using following command in our Kali Linux system:
    sudo apt-get install apt-transport-https -y
    This is a very small tool with 149kb size. So it will install in some second.
  5. Then we open the sources.list file in leafpad located at /etc/apt/sources.list
    We need to change the first http to https like following screenshot:
http to https
    Then we save and close it, and run apt update command to update the repository. Then we can check the internet speed of downloading big tools or upgrading system we're sure that the speed will increase.

5.    Changing the HTTP


       We use this method if the other methods are not working. In this method we 
       open the sources.list file from the /etc/apt/ using following command:

sudo mousepad /etc/apt/sources.list
And then we change the second http to repo as seen in following screenshot:


Then save and close it. This change will boost the speed and make you happy.

These tricks should should help every user. So don't forget to comment and follow us to stay updated. Now we are also available on Twitter & Medium.
author-img
Kali Linux

Comments

20 comments
Post a Comment
  • Unknown photo
    UnknownMarch 25, 2020 at 8:47 AM

    it does'nt work.The detail are below
    Err:1 http://repo.kali.org/kali kali-rolling InRelease
    403 Forbidden [IP: 144.217.77.182 80]
    Reading package lists... Done
    E: Failed to fetch http://repo.kali.org/kali/dists/kali-rolling/InRelease 403 Forbidden [IP: 144.217.77.182 80]
    E: The repository 'http://repo.kali.org/kali kali-rolling InRelease' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.

    Delete Comment
    • Kali Linux photo
      Kali LinuxMarch 25, 2020 at 11:16 AM

      try with a reboot

      Delete Comment
      • AnonymousMay 5, 2020 at 11:38 AM

        rebooted but does not work

        Delete Comment
        • Kali Linux photo
          Kali LinuxMay 5, 2020 at 2:27 PM

          enter command
          sudo mousepad /etc/apt/sources.list
          then erase everything and paste following line
          deb http://http.kali.org/kali kali-rolling main non-free contrib
          then save and close it..and try again

          Delete Comment
          • AnonymousJuly 15, 2020 at 2:42 PM

            Install this script from github and follow the on-screen instructions. It'll fix your problem and will do all necessary changes to your system automatically. Thanks me later! :)

            Delete Comment
            • AnonymousAugust 13, 2021 at 2:33 AM

              Install this script from github and follow the on-screen instructions. It'll fix your problem and will do all necessary changes to your system automatically. Thanks me later! :)


              Big thanks. This worked for me

              Delete Comment
            • Unknown photo
              UnknownMarch 27, 2020 at 2:45 PM

              Thank you .It worked for me

              Delete Comment
            • AnonymousApril 10, 2020 at 9:34 AM

              amazing

              Delete Comment
              • Akjam photo
                AkjamMay 9, 2020 at 5:57 PM

                God, it is so stupid of you to actually suggest good internet speed. Whole world knows kali apt update is slow despite your internet speed.

                Delete Comment
              • kamaldnpMay 20, 2020 at 1:12 PM

                Hacking tool

                Delete Comment
                • NoviceJune 8, 2020 at 12:19 AM

                  Thanks!. It worked for me.

                  Delete Comment
                  • Unknown photo
                    UnknownJune 24, 2020 at 8:01 PM

                    Your work is help many people like me.
                    And i am appreciating to you and your team.
                    May GOD give you & your team more success.

                    Delete Comment
                    • AnonymousJune 27, 2020 at 1:13 PM

                      worked for me.....
                      200kbps converted into 7000kbps
                      thanks..

                      Delete Comment
                      • sivakrishna photo
                        sivakrishnaJuly 23, 2020 at 8:54 AM

                        I am so glad that i found this article. I had 100KBps something it went upto 1MBps. Thank you so much.

                        Delete Comment
                        • AnonymousSeptember 4, 2020 at 11:40 AM

                          whenever i changed and trying to save it says - failed to save

                          Delete Comment
                        • Unknown photo
                          UnknownApril 29, 2021 at 7:35 PM

                          thank you so much, it works fine now

                          Delete Comment
                          google-playkhamsatmostaqltradent