Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Is there a way to pull source for a package (apt-get source) but specify the release? For example, I'd love to be able to just run apt-get source --raring python-imaging. I know I can manually pull from, is there a tool that can do this for me?

share|improve this question
the release is usually specified in the url of the package source/repo not in the command – RobotHumans Mar 4 '13 at 4:43
Is the tag rmadison relevant for this question? – jokerdino Mar 4 '13 at 17:29
I was thinking rmadison would be part of the solution, perhaps not. – mfisch Mar 4 '13 at 22:34

Kind of.

Assuming you have that release in your sources.list you can do something like this.

apt-get source python-imaging/raring

Of course, if you are going to put other releases in your system sources.list you will also need to put appropriate pinning in place, or your regular use of apt-get will suffer. A better option then, in my opinion, is to use a separate apt environment, temporarily pointing to it using the APT_CONFIG environment variable.

The link below point to a blog post on how I put those pieces together for apt-get download. The exact same principle applies for apt-get source, just that you instead need the deb-src entries in your custom sources.list.

share|improve this answer
I think what I need to do is patch rmadison to pull source. – mfisch Mar 4 '13 at 22:34

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.