Linux – Is it possible to install all packages from an APT repository

installationlinuxpackages

Is it possible to install all packages from an APT repository?

I know it is possible to do it manually, but then you would need to know all the package names, and I don't. Any suggestions?

Thanks.

Update:
Well, you guys are going to kill me for this, but the reason for my madness is that I want to install all the packages from BackTrack into my Ubuntu installation. I really don't like the idea of having it in a VM and having a separate partition for it is even more out of the question. I know that the folks at BackTrack doesn't like it when people leech their repositories, but that's what you get for releasing open source software. Stupid? maybe.. A valid reason? probably not.. Do I still want it? Yes.

Another edit:
I have now given up on this as it seems impossible to get it to work even by manually installing packages.

Best Answer

That's a pretty ridiculous thing to do.

Edit: as suggested in other answers/comments, there are much easier ways to accomplish this through preexisting tools such as the package manager or aptitude. At any rate, the following describes where this information comes from. Their answers make more sense.

Ubuntu's repository locations can be found in /etc/apt/sources.list When you look in that file you'll probably see something like:

deb http://us.archive.ubuntu.com/ubuntu/ lucid universe restricted multiverse main

If you visit the url you can for example find the binary packages for lucid main for i386 at the following location:

http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/binary-i386/

If you download archive file, there is file within that has a text file with the packages inside. By looking at it its easy to understand the format. For example, the first entry in the file:

Package: abrowser
Priority: optional
Section: web
Installed-Size: 132
Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
Architecture: all
Source: firefox
Version: 3.6.3+nobinonly-0ubuntu4
Replaces: abrowser-3.5, abrowser-3.6
Provides: abrowser-3.5, abrowser-3.6
Depends: firefox, abrowser-branding
Conflicts: abrowser-3.5 (<< 3.6~hg20100117r33523), abrowser-3.6 (<< 3.6~hg20100117r33523+nobinonly)
Filename: pool/main/f/firefox/abrowser_3.6.3+nobinonly-0ubuntu4_all.deb
Size: 79050
MD5sum: 109aa3010e292e951750d90d6b636122
SHA1: 23ba3fbea8c0a06619184d43f775e3d2b3ae1374
SHA256: c4cdf6cffc9f43194a9a6e52b9aa1495678f3f3c3847ef491fd5823aa5fba4a4
Description: metapackage for the unbranded abrowser
 ABrowser is an unbranded version of the popular Firefox webbrowser;
 it is written in the XUL language and designed to be lightweight and
 cross-platform.
 .
 This is a metapackage that will point to the latest abrowser package in
 your distribution.
 Don't remove this if you want to receive automatic major version upgrades
 for this package in future.
Xul-Appid: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 3y

So you could then write a script that parses out each package name in the file and adds it to your 'sudo apt-get install' line...

...but that seems like a crazy thing to do. I imagine not all packages are going to agree with each other and do you really need EVERYTHING? It seems like an exercise in wasted time and resources for you and others.

Related Question