How to specify directory for apt-get to save the packages

9,256

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:
9,256

Related videos on Youtube

JOHN
Author by

JOHN

Updated on September 18, 2022

Comments

  • JOHN
    JOHN over 1 year

    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 ?