Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to download some packages to install in my other machine which doesn't have internet access, and has a 64-bit architecture.

Since this machine which has internet connection is 32-bit, it only downloads 32-bit packages with apt-get.

I want to know if it is possible to:

  1. download 64 bit packages;
  2. download those which are already present.

Alternatively, is it possible to get the url for these packages in a automatic way?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You can use aptitude (to be installed):

sudo aptitude -o APT::Architecture="amd64" update
aptitude -o APT::Architecture="amd64" download package-name

(after that, remember to do an apt-get update without -o option, to restore correct i386 information).

It is also possible to show packages URLs with

apt-get --print-uris install package-name

but this only works for non inistalled packages. For 64 bits packages, change the suffix _i386.deb with _amd64.deb.

Alternatively,

apt-cache --no-all-versions show package-name | grep ^Filename

shows URL but without the leading server information. Server information can be obtained from:

apt-cache --no-all-versions policy package-name | 
    grep -A2 '^  [^ ]' | tail -1 | awk '{ print $2 }'
share|improve this answer
    
Perfect. I got to the --print-uris but since most packages were installed i wasn't getting anything. Thanks a lot! –  random Sep 29 '11 at 8:14
add comment

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.