Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Should I use http or ftp links in /etc/apt/sources.list? What I mean is is using something like,

deb ftp://ftp.debian.org/debian/ squeeze main contrib non-free
deb-src ftp://ftp.debian.org/debian/ squeeze main contrib non-free

better or worser than using,

deb http://ftp.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free

I guess as apt uses wget to fetch things, this is same as asking if wget is faster on ftp. Thanks!

share|improve this question
No, apt does not use wget. It uses its own internal method. – Faheem Mitha Jan 31 '12 at 5:17
up vote 9 down vote accepted

You're not going to save much time using one over the other, but if efficiency is what you care about, use HTTP. An FTP client has to send a username and password and receive acknowledgments for those, and then issue several commands to set up the file transfer and receive acks for those, too. All this back and forth magnifies the effect of network latency; with 100-200ms ping times to the server you could waste a second setting up the transfer. With HTTP, the client opens the connection, sends one command and the file transfer starts immediately.

share|improve this answer
Always use HTTP. We need to discourage the use of FTP so that it can be made obsolete sooner. – Michael Dillon Feb 1 '12 at 7:57

Well, personnally I would go with FTP (stands for File Transfer Protocol) whose primary goal is... file transfer. But if you want to be sure, like empirically sure, there are a few utilities that might do the job (i.e. test, compare and select the fastest ones) for you. Those I know of are netselect-apt (same package name) and apt-spy. You don't have to give them a server list as they will download it from Debian main server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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