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:
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:
Maintainer: Ubuntu Mozilla Team <firstname.lastname@example.org>
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)
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
This is a metapackage that will point to the latest abrowser package in
Don't remove this if you want to receive automatic major version upgrades
for this package in future.
So you could then write a script that parses out each package name in the file ads 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.