is there any way to specify the destination directory for each download in apt -get command to save all the downloaded packages in a custom directory instead of archive directory for offline use.

If yes then how to use this custom directory to reinstall application ?

link|improve this question

60% accept rate
feedback

migrated from stackoverflow.com Jul 26 '11 at 22:38

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

1 Answer

up vote 2 down vote accepted

From the apt-get manpage:

   /var/cache/apt/archives/
       Storage area for retrieved package files. Configuration Item:
       Dir::Cache::Archives.

You can specify it like this:

$ sudo apt-get -o Dir::Cache::Archives=/tmp install wget

Note that this will fail unless that directory has a partial sub-directory

link|improve this answer
+1 Thanks. This works for me. – JOHN Jul 26 '11 at 21:53
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.