Ubuntu – How to select the fastest mirror from the command line

aptcommand linerepository

I want to update my sources.list file with the fastest server from the command line in a fresh Ubuntu Server install. I know this is trivially easy with the GUI, but there doesn't seem to be a simple way to do it from from the command line?

Best Answer

Pakket netselect-apt

    dapper (net): Choose the fastest Debian mirror with netselect 
    0.3.ds1-5: all
    hardy (net): Choose the fastest Debian mirror with netselect 
    0.3.ds1-11: all
Pakket apt-spy

    dapper (admin): writes a sources.list file based on bandwidth tests 
    3.1-14: amd64 i386 powerpc

Not included in newer Ubuntu due to secturity issues it seems: see: Bug report

But .. I normally just use ping to find out the speed of a connection to some location. Amount of hops and latency.