Suppose I install debian,and my Internet network comes down. Install works OK,but at the time to setup the apt mirror from list give error because network Internet is down. I continue to install without mirror(apt/sources.list contain only cdrom entry) Internet work..how to setup the debian mirror after installation? I know how to edit sources.list with vi,but I want the menu with mirror list selection.


You just want some mirror or the closest/fastest mirror. If it's the latter, then you could just install netselect-apt and run it. I just ran to see which are the fastest form my geographical location and it said -

[$] sudo netselect-apt testing
    The fastest 10 servers seem to be:


    Of the hosts tested we choose the fastest valid for HTTP:

    Writing sources.list.
    sources.list exists, moving to sources.list.1484862805

[$] cat sources.list.1484862805

     1  # Debian packages for testing
     2  deb http://debian.ec.as6453.net/debian/ testing main contrib
     3  # Uncomment the deb-src line if you want 'apt-get source'
     4  # to work with most packages.
     5  # deb-src http://debian.ec.as6453.net/debian/ testing main contrib
     7  # Security updates for stable
     8  # deb http://security.debian.org/ stable/updates main contrib

Hope you find it useful.

  • this is good asnwer – elbarna Jan 19 '17 at 23:24

As an alternative to the Debian redirector, you could try http://deb.debian.org/

This is a CDN powered by AWS CoudFront and should be faster than the redirector.

how to setup the debian mirror after installation?

Use apt edit-sources (as root!) to open /etc/apt/sources.list in the (command line) text editor of choice; when the file is saved it will be checked for syntax errors.


One problem with netselect is that the fastest download can change over time and you need to run it periodically.

You could use the Debian Redirector which will always choose the best download - http://httpredir.debian.org/

Note that the Security Repository need to be the ordinary one and not through Redirector

  • I actually have httpredirector setup at my end, that works as well. Sometimes, rarely though even that conks out. – shirish Jan 19 '17 at 23:59
  • and now deb.debian.org has taken over from redir.debian.org so that's that. – shirish Aug 8 '18 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.