Home How to Adding Kali Linux mirrors after offline installation

Adding Kali Linux mirrors after offline installation

by blackMORE

How to fix Kali apt-get slow update - blackMORE OpsIf you installed Kali offline from a CD/DVD or USB (or have chosen not to connect to internet during installation), you probably have an empty sources.list file with just 2 lines on it (CDROM’s). Also if your internet connection is not reliable or too slow to do an update during install, you might’ve chosen a similar installation option. Either way, you won’t get the mirrors or repositories during a hard disk install added to your sources.list file. This will cause issues in the future when seeking new or updated software packages from the Kali repos.This guide shows how to add official Kali Linux mirrors or repositories.

Similar posts exists in this website to troubleshoot other problems which might be worth looking into:

  1. How to fix Kali Linux apt-get slow update?
  2. How to change repositories to a different mirror?
  3. Fix “WARNING: The following packages cannot be authenticated!” in Kali Linux

Kali Linux sources.list Repositories page: Official Link

Open sources.list and comment all lines with # in front

leafpad /etc/apt/sources.list

Add Official Repo’s only:

## 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
## 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

Save and close the file.

You can check that the sources have been added and are being used by loading Add/Remove Software from the Sys Tools menu and selecting System -> Software Sources.

Clean your apt-get

apt-get clean

STOP: If your Kali Linux apt-get update is slow follow this guide to sort out other issues: How to fix Kali apt-get slow update?

To switch repositories to a different mirror of your choice, follow this guide: How to change repositories to a different mirror?

Do an apt-get update

apt-get update

Do and upgrade

apt-get upgrade

Finally do a distribution upgrade

apt-get dist-upgrade

That’s it, you’re set.Thanks for reading. Please share.

You may also like

12 comments

krishna June 22, 2014 - 12:26 am

thanks …. that was very helpful…

Reply
Gertin July 18, 2014 - 4:21 am

I’m not a big fan of being dependent on the Internet for installations… How would you get all updates, and dependencies without installing them and keep them for a later off-line installation?

Reply
blackMORE Ops July 23, 2014 - 12:23 am

You need to setup a local repo. (you can just copy DVD contents). There’s plenty of guides out there. Enjoy.

Reply
Marsh April 5, 2016 - 9:51 am

Give me a link to download that pls

Reply
Gunshine August 23, 2014 - 11:33 am

I keep getting an error whenever I do this. Can’t even update…

————————————————————————————————————————————————————————-

:~# apt-get update
Err http://http.kali.org kali Release.gpg
Unable to connect to http.kali.org:http: [IP: 123.123.123.123 80]
Err http://security.kali.org kali/updates Release.gpg
Unable to connect to security.kali.org:http: [IP: 123.123.123.125 80]
Reading package lists… Done
W: Failed to fetch http://http.kali.org/kali/dists/kali/Release.gpg Unable to connect to http.kali.org:http: [IP: 123.123.123.123 80]

W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/Release.gpg Unable to connect to security.kali.org:http: [IP: 123.123.123.125 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.

————————————————————————————————————————————————————————-

What am i doing wrong???

Reply
blackMORE Ops August 23, 2014 - 12:56 pm

You got Kali 1.0.6 or an older version. Kali dev team removed old repo. Only option is to do a fresh install of Kali 1.0.8. I had similar issues with one of my virtuals that I forgot to upgrade.

Reply
Gunshine August 23, 2014 - 6:45 pm

i have 1.0.7. didn’t think to check that they already updated…

Reply
Rotorhead November 3, 2014 - 2:05 am

Did you try sudo leafpad /etc/apt/source.list
That will give you superuser so you can save the file changes to sources.list

Reply
Vicky September 26, 2014 - 1:47 am

thank u so much…….it’s work

Reply
Zixc October 20, 2014 - 10:48 am

TY

Reply
Peter December 31, 2014 - 7:08 am

Everything works, but for some reason kali breaks the wireless connection after a while and then just reconnects .This has nothing to do with the wireless network.

Reply
Sudhanshu April 26, 2020 - 2:25 am

It shows leafpad command not found. Plz help. I need to get the GUI and also the important mirrors and all as i installed without an internet connection.

Reply

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.