Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently in a architecture amd64, so when I try apt-get download vlc, it downloaded the appropriate architecture for my system, but how can I download the i386 version via apt?

It's for export to another system that doesn't have internet connection, also is there is any way to download any dependencies that follow?

share|improve this question
Do you want to install it? – Braiam Feb 15 '14 at 0:56
Just fyi, I have expanded my answer with new knowledge. – Seth May 23 '14 at 21:26
up vote 8 down vote accepted

Yes you can, just append :i386 to the download command, like this:

sudo apt-get download <package>:i386  

So for you:

sudo apt-get download vlc:i386  

I am unaware of any way of automatically downloading a packages dependencies, besides build-dep but that won't work in your case.

After poking in the manpage a bit more, I have found that you can, in fact, use build-dep to an extent like this:

sudo apt-get build-dep --download-only vlc:i386  

Which will then download the required packages into the current directory. Note however, that build-dep is looking at compiling the package from source, not installing it from a .deb so it will suggest things like build-essential and gcc which may be needed to compile vlc, but not necessarily install from a .deb.

It may be easier to list vlc's main dependencies with apt-cache:

apt-cache depends vlc:i386  

If you want to filter by just depends use:

apt-cache depends vlc:i386 | grep 'Depends'  

Note that some packages, like libc6 come by default in Ubuntu, so you won't need to download those. If you just want to download all the dependencies and deal with whether you need them or not later you can use this script:

for i in $(apt-cache depends vlc:i386 | grep -E 'Depends|Recommends|Suggests' | cut -d ':' -f 2,3 | sed -e s/'<'/''/ -e s/'>'/''/); do sudo apt-get download $i 2>>no32.txt; done  

This will download all the dependent, recommended, and suggested packages and reroute any errors to no32.txt. You should take a look in there when you're done, because some needed packages that don't have i386 versions (i.e. they aren't binaries) will be in there.

Just apt-get download those.

Note that this script isn't very smart, it doesn't take a lot of things into account, so you may get some silly errors, it should work in general however.

share|improve this answer
And what about build-dep package:i386? – enedil Feb 15 '14 at 1:19
@enedil build-dep downloads and installs, so this would install a bunch of i386 packages on his machine, which is not what he wants. See man apt-get for details. – Seth Feb 15 '14 at 1:22
There is also an aptitude download command. Not sure if it is multiarch enabled though. – Faheem Mitha Feb 18 '14 at 21:05
@FaheemMitha Yes, aptitude can do just about everything apt-get can. – Seth Feb 18 '14 at 21:07

Your Answer


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.