Using the nearest server to your location does not guarantee that you will get faster connection speed, other factors such as network congestions, faulty routers and bandwidth may affect the speed of your software installations.
Thus it is best to update the sources.lst file from time to time to keep updated with the fastest mirror to you, to ensure faster software installation and updates on your computer.
Generally there are two ways to do this, one is by using Synaptic to check for the fastest mirror (works for Ubuntu too!) and secondly by using netselect-apt (currently does not work for Ubuntu).
How to get fastest apt-get mirror with netselect-apt (Debian)
Firstly you need to install netselect-apt. then just run the command by typing “netselect-apt distribution name” to get the fastest mirror. Append -n switch, if you want to include the non-free repository too
# netselect-apt lenny
Example (non-free repos) :
# netselect-apt -n lenny
The application will test each apt-get mirrors it could find on debian.org site and perform some connection to estimate its speed. At the end of the test, the fastest mirror will be selected and used in the /etc/apt/sources.lst file.
Nice, but does it work on Ubuntu?
Note that although Ubuntu has netselect-apt, the application is currently broken under Ubuntu
( as of Gutsy Gibbon ). Ubuntu users should try the Synaptic method instead.