Select Fastest Debian Mirror for apt-get

By | 2011/05/15

With Debian you can easily auto-detect the fastest mirror for apt-get!

First install this package:

$ sudo apt-get install netselect-apt

Then run the following, adjusting for your desired version. I’m using LMDE, so I’m going to run:

$ sudo netselect-apt testing

Other examples:

sudo netselect-apt [stable|testing|unstable|experimental|release_codename|sid]
01netselect 02netselect

This will query various debian mirrors then leave a file sources.list in your current working directory.

You can now manually update your /etc/apt/sources.list with the fastest mirror found for your system.

$ sudo nano /etc/apt/sources.list

Only replace the existing line

deb http://[___] stable main contrib

with your new mirror. Leave others such as and third party repos as they are.