Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What are the options for apt-get on debian to download to a specific directory. Right now I'm using apt-get -d install packagename and then just fetch it in /var/cache/apt/archives/ but it would be nice if I could actually redirect the package to some other directory. Normally in ubuntu I would just do apt-get download but this option isn't available for me in debian.

share|improve this question
    
manpages.ubuntu.com/manpages/lucid/man1/apt-file.1.html. Check the link. Check the cache option. –  Raghunandan Apr 26 '13 at 18:25
    
apt-get gained the download command in Debian Wheezy which is not released yet (but is due to be released in the 1st quarter of May). Since Ubuntu builds on testing and unstable Debian archives its apt-get already has this command. –  kostix Apr 28 '13 at 19:02
add comment

1 Answer

up vote 0 down vote accepted

The first comment to this answer solves your problem. That is, to fetch a package to the current directory you could do

apt-get -d -o dir::cache=`pwd` -o Debug::NoLocking=1 install package

One drawback which, I think, is still present is that it won't allow you to download a package which is already installed (even with --force) because this is the install command after all. At least this is what happens with my apt-get v0.8.10.3 from Debian Squeeze.

share|improve this answer
add comment

Your Answer

 
discard

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.