Page 1 of 1

Does command 'apt-get -d update' downloads .deb packages?

Posted: 2012-08-22 14:09
by anurag
To download .deb packages I have pointed /etc/apt/sources.list to my repository on other Ubuntu machine. Does command 'apt-get -d update' downloads .deb packages to '/var/cache/apt/archives'?

Thanks.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-22 14:28
by 62chevy
DESCRIPTION
apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. Several
"front-end" interfaces exist, such as dselect(1), aptitude(8), synaptic(8) and wajig(1).

Unless the -h, or --help option is given, one of the commands below must be present.

update
update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s)
specified in /etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the Packages.gz files, so that
information about new and updated packages is available. An update should always be performed before an upgrade or dist-upgrade. Please be
aware that the overall progress meter will be incorrect as the size of the package files cannot be known in advance.

Code: Select all

man apt-get

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-22 16:10
by adenukolnis
apt-get update simply updates the package lists with packages that are available. It does not download any deb packages.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-22 17:09
by 62chevy
adenukolnis wrote:apt-get update simply updates the package lists with packages that are available. It does not download any deb packages.

Correct after running that then you need ' apt-get upgrade ' or ' apt-get dist-upgrade '

Code: Select all

man apt-get
Run the above man page and have all your question answered.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-22 17:11
by golinux
62chevy wrote:

Code: Select all

man apt-get
Run the above man page and have all your question answered.
Teach a man to fish . . . yada, yada . . .

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-22 19:44
by nadir
Lots of wisdom to be found in the answers, but, oh my, none of it answers what was asked for.

Code: Select all

apt-get install -d mousepad
assuming mousepad is the package one wants to download.

And the man page you all love to quote.
-d, --download-only
Download only; package files are only retrieved, not unpacked or installed. Configuration
Item: APT::Get::Download-Only.
Makes me feel like a genius, surrounded by idiots. Once again.
I mean, come'on. A dude asks something, and the man-page is given as one part of the answer, the other part is wrong (and it is written in the man-page).
That is funny. Or sad, depends on the character (char id[] = "clown"; or char id[] = "misantroph";).

If you give the man-page as the answer, at least read it yourself.

I yet have to read a post by golinux which is not chat, btw.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-22 23:19
by adenukolnis
nadir wrote:Lots of wisdom to be found in the answers, but, oh my, none of it answers what was asked for.

Code: Select all

apt-get install -d mousepad
assuming mousepad is the package one wants to download.
I thought the question was Does command 'apt-get -d update' downloads .deb packages to '/var/cache/apt/archives'?

To which the answer is simply a resounding NO.

I don't see anything about any certain package at all.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 00:17
by nadir
In the OP it is said: "to download packages". For unknown reasons that makes me thing that he wants to download packages. But perhaps its a she. And it doesn't matter much. But if someone who doesn't understand synaptic after 6+ years of debian based distros speaks of "fish"... well: that is funny.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 00:43
by adenukolnis
I guess the poster needs to clarify....they done confused me.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 07:00
by anurag
Thanks all for your replies & my sincere apologies if the question and its description is confusing.

However nadir got exactly what I wanted. I want to download .deb packages from my personal repository. And now I have got the answer is 'apt-get -d update' is NOT the command to download .deb packages from my repository but the command 'apt-get install -d mousepad' is, assuming mousepad is the package one wants to download.

Now I have few questions...

1. If I want to download multiple packages from my repository, which command to use? Is 'apt-get install -d *' will do the needful to download all .deb files from my repository?

2. When I enter command 'apt-get install -d xll.deb' I get following:

Code: Select all

anurag:~# apt-get install -d xll.deb 
Running /usr/bin/apt-get install -d xll.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package xll.deb
E: Couldn't find any package by regex 'xll.deb'
anurag:~#
Obviously in the package list it seems that 'xll.deb' is not there. Whats wrong here?

3. Where is the location of 'package lists' to check if certain package is there or not?

Here I would like to highlight that the .deb packages I want to download are from my personal repository and not from Debian repository.

BTW nadir I am not she but HE. :)

Thanks.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 15:09
by phenest
anurag wrote:3. Where is the location of 'package lists' to check if certain package is there or not?

Code: Select all

apt-cache search
Again, look at the man pages for usage.
anurag wrote:Here I would like to highlight that the .deb packages I want to download are from my personal repository and not from Debian repository.
For that, you need pinning.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 17:46
by 62chevy
nadir wrote: If you give the man-page as the answer, at least read it yourself.

You missed one thing this is the second time the OP asked this question not that is a problem, just wanted to make sure he understood what ' apt-get update ' did and when to use the -d --download-only option. From his last post looks like he understands now so all is good.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 18:51
by emariz
Why exactly do you want to download those Debian packages without installing them? Do you want to create a personal repository from where other computers would be updated, to save bandwidth? Will this be a permanent procedure or just a one-time one? The thing is that if these packages are not installed on the "repository" machine, you will have to check the development change logs for new versions of these packages.

It is simpler to install all the required packages on the "repository" machine and then use its directory /var/cache/apt/archives/ as the source for the other machines. Every once in a while, and provided that you did not change your main sources, you could tell Aptitude to delete from the cache the packages that no longer exist on the servers, which deletes old versions of the downloaded packages.

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 19:05
by adenukolnis
Maybe more important...

Why exactly are you wanting to do? What are you trying to accomplish overall?

Re: Does command 'apt-get -d update' downloads .deb packages

Posted: 2012-08-23 19:19
by phenest
adenukolnis wrote:Maybe more important...

Why exactly are you wanting to do? What are you trying to accomplish overall?
This is just a continuation of their other thread. They are trying to do something that they haven't researched first.
emariz wrote:Why exactly do you want to download those Debian packages without installing them?
Testing purposes? They are trying to build a Debian repository.