Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Will apt-get follow 302 redirects if instructed?


I have my own DEBIAN repositories and I am in the process of evaluating if I can "virtually consolidate" all of them to one. For this, I need to understand if client side apt-get can follow 302 redirects since the "virtual repo" would use this "trick" to have apt-get fetch .deb package from different places.

share|improve this question

migrated from Oct 4 '09 at 4:09

This question came from our site for professional and enthusiast programmers.

up vote 6 down vote accepted

Since apt 0.7.21 (14th April 2009) it does, prior to that it didn't.

(The reason was that some mirrors of Debian ran apache with the mod_spelling module, which would redirect non-existent urls to similarly spelled ones -- so asking for dpkg_1.0-2_i386.deb on an out of date mirror might get you a redirect to dpkg_1.0-1_i386.deb)

See Debian bug #79002 for more details if you're interested.

Added: oh, Ubuntu got it earlier: (9th Feb 2009). See Ubuntu bug#18645

share|improve this answer
FYI: apt in Lenny (5.0) is 0.7.20. Which means that this is not supported under the stable Debian. – Zoredache Oct 4 '09 at 10:49

Well apt-get it more of a package handler than URL handler. The repo URLs are passed to apt-get through the distro (software sources in Ubuntu.) And since the URLs only represent directories in the end...i don't see why 302 redirects wouldn't work in apt-get.

Are you creating or modifying your own repo?

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.