In my /etc/apt/sources.list I have:

deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main

Now I need to get source of a package from jessie (testing). How can I specify a different sources.list when I call apt-get source ?

apt-get source package-name

PS: I don't want to modify /etc/apt/sources.list, or I want to run apt-get as a user who cannot modify the system wide sources list.

migrated from stackoverflow.com Aug 12 '14 at 13:37

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

  • I would donwload the source package manually – hek2mgl Aug 12 '14 at 8:50
  • @hek2mgl - could you please provide an example how you would download the package manually ? – Martin Vegter Aug 12 '14 at 9:21
  • Which package do you want? – hek2mgl Aug 12 '14 at 9:37
  • @hek2mgl - for example ipython-notebook from jessie – Martin Vegter Aug 12 '14 at 9:53
  • ipython-notebook will getting built from the ipython source package. You have svn access here: anonscm.debian.org/viewvc/python-modules/packages/ipython/trunk – hek2mgl Aug 12 '14 at 10:45

You can do this by setting the Dir::Etc::sourcelist configuration setting:

apt -o "Dir::Etc::sourcelist=/path/to/your/sources.list" source package-name

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.