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.

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 ?

share|improve this question

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

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

1 Answer 1

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

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

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.