Results 1 to 9 of 9
Hi All,
Is there a way to download packages to a particular directory (ie so I can just download 100 packages using apt-get to my home directory?). Furthermore, is there ...
- 12-15-2011 #1
Download Packages to Directory via apt-get?
Hi All,
Is there a way to download packages to a particular directory (ie so I can just download 100 packages using apt-get to my home directory?). Furthermore, is there a way for me to download the packages and all dependencies? Thanks in advanceBodhi 1.3 & Bodhi 1.4 using E17
Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17
"The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"
- 12-16-2011 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Google?
?Code:man apt-get
?Code:apt-get download
?Code:apt-cache depends <PKGNAME> | grep Depends | awk {' print $2 '} | xargs apt-get download
- 12-16-2011 #3Banned
- Join Date
- Nov 2011
- Location
- India
- Posts
- 29
- 12-16-2011 #4Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Don't think that command will work. But this will:Use following 'apt-get -d package-name'
Let's get this out of the way: Depending on the version of apt installed, your options will vary. All of the examples posted will work *depending* on your version of apt. That is why "man apt-get" is the first thing to review.Code:apt-get -d install <PACKAGE>
- 12-16-2011 #5
Thanks to both of you. I usually do extensive googling but I was at work and decided I may get faster results just posting a question (I know, lazy). I knew about download option but I specifically wanted it downloading to /home/user/.software and didn't see any options for that, but thanks for the advice
Bodhi 1.3 & Bodhi 1.4 using E17
Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17
"The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"
- 12-16-2011 #6Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
So let's clarify again...
If you Google and/or read the manual:
The "apt-get download" (if your apt supports it) will download to the current working directory (but it only does a single package without dependencies, hence the apt-cache command.) The apt-get -d switch will download to whatever "cache" directory is specified in apt.conf, so it can be changed.
Code:man apt.conf Dir::Cache contains locations pertaining to local cache information, such as the two package caches srcpkgcache and pkgcache as well as the location to place downloaded archives, Dir::Cache::archives. Generation of caches can be turned off by setting their names to be blank. This will slow down startup but save disk space. It is probably preferred to turn off the pkgcache rather than the srcpkgcache. Like Dir::State the default directory is contained in Dir::Cache
- 12-17-2011 #7
Go to the repo's and download aptoncd.
It downloads the packages you want or need and then you can burn them to a Cd.
Alternatively, you can throw it on a USB drive.
I used to use this program years ago to update systems on dial up.
- 12-17-2011 #8
so I'm real close. The only issue is that it doesn't work for installed packages. I'm suing sudo apt-get -d install <PKGNAME>, seems to do the trick but it's not working for packages already installed. Basically I want to get all the packages required to run E17 from my Bhodi boot and then use those files in a custom iso I'm making. How do I download the packages that are already installed on the system? I'm getting a "already newest version". I read the man page and didn't see anything that's like "force download" or anything similar. Thank you
Bodhi 1.3 & Bodhi 1.4 using E17
Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17
"The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"
- 12-17-2011 #9This puts a list of all your installed packages and their status into a file named my-packages in your home directory. You can runCode:
dpkg --get-selections > ~/my-packages
to install all those packages on another system.Code:sudo dpkg --set-selections < my-packages && sudo apt-get dselect-upgrade


Reply With Quote
