8

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.

4
  • 9
    Probably can't install all packages since some will conflict. Is there a reason you want to do this?
    – heavyd
    Jun 11, 2010 at 2:51
  • 2
    This is most likely one of the worst ideas I've hear in some time...this will result in any extremely bloated system. Yes, I think it still would work, but installing 1k+ applications can't be a good thing, not to mention all the libraries and the required disk space (most likely 40GiB+). I agree with heavyd, why would you wanna do this?
    – Bobby
    Jun 11, 2010 at 11:29
  • 2
    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. Jun 12, 2010 at 14:40
  • 2
    so your root question seems to be "can I install packages from one distribution's package repository into another distribution", which very different than what you've actually asked. you'll be better off reinstalling entirely; if you really want to install, eg, Backtrack packages in Ubuntu, try grabbing Backtrack's source packages and building your own packages on your Ubuntu system. Jun 12, 2010 at 16:03

5 Answers 5

8

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 <[email protected]>
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.

1
  • 1
    it'd be easier to use Synaptic or Aptitude to select all packages and install rather than scripting it like this. also note that the same information you suggest grabbing from within the package is available via apt-cache show [packagename]. Jun 11, 2010 at 8:14
3
links -http-proxy myproxyserver.com:8080 -dump http://repo.offensive-security.com/dist/bt4/binary/ | awk '{print $3}' | grep -i deb | cut -d . -f 1 > backtrack.txt

and then:

for i in $(cat backtrack.txt); do sudo aptitude -y install $i; done

Source:

http://micksmix.wordpress.com/2009/11/20/getting-the-backtrack-menu-structure-and-tools-in-ubuntu/

For installing backtrack utilities and menu structure in Ubuntu, download this and follow the readme instructions:

http://sourceforge.net/projects/backtrackubuntu/files/menu%20.zip/download

1

I am not sure why you would want to do that,
But, how about starting the Synaptic Package Manager and selecting all packages from the "Not Installed" list?
You would still find some conflicting ones in that list causing others to be removed...

0

Open Synaptic Package Manager, add the repository if required (use settings -> repositories -> other software ->add) (I can't imagine why one would want to do this with one of the standard repositories) choose Origin on the left hand size, which will give a list of repositories. Select the relevant repository. Select all packages (select one then CTRL-A) right click and choose Mark for installation.

Deal with any conflicts or changes that get flagged then click on apply.

0

The answer depends on what exactly you want to achieve, which you haven't really told us. Still, try this command: sudo aptitude install '~T'

If you are interested in one particular repo, here is a solution inspired by Jesse's answer:

xargs -a <(grep-dctrl -nsPackage . /var/lib/apt/lists/ppa.launchpad.net_gstreamer-developers_ppa_ubuntu_dists_lucid_main_binary-amd64_Packages) sudo aptitude install

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .