Super User is a question and answer site for computer enthusiasts and power users. 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

I want to pick up Python3 from squeeze, meanwhile I would like to stay with lenny with all other packages. Is this possible by just modifying source.list file?

share|improve this question

Here are instructions for enabling and using backports in Debian.

Here is the page for Python3.

share|improve this answer
Thanks, this is exactly what I want. – aXqd Apr 26 '10 at 6:20
Sorry, I just noticed python3 has not been included in lenny-backports. It is only in squeeze and sid. Is there any way to work around this? Also, I cannot find /etc/apt/preferences file in my debian system. – aXqd Apr 26 '10 at 6:59
-1 link-only answer (links aren't broken now, but could break in future) – o0'. Jan 21 '14 at 15:17
up vote 0 down vote accepted

In the end, I took these steps:

  1. Create /etc/apt/apt.conf file with this line below:(including the semicolon)

    APT::Default-Release "stable";

  2. Change all 'lenny' to 'stable', and 'squeeze' to 'testing' in /etc/apt/source.list file;

  3. After 'apt-get update' command, 'apt-get upgrade' command reported no upgrades as expected;

  4. 'apt-cache search python3' worked fine now;

  5. 'apt-get -t testing install python3' command installed python3 without any problems.

However, I do still have some issues:

  1. Default-Release cannot be set to "lenny";
  2. Default-Release can be set to '4.0' and '5.0*', but not '5.0';
  3. These packages 'libncursesw5 libsqlite3-0 libssl0.9.8 and sqlite3' still got upgraded when I did 'apt-get -t testing install' command.
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.