I am thinking of getting a VPS and using Ubuntu with it. I've installed linux on home servers and I almost always choose a very bare system and then install packages manually after the install is complete.

However for a VPS, some providers have pre-made images that can be used. If I were to use one of them, what is the easiest way of finding out/listing what is already installed, including things like locations and versions?

link|improve this question

50% accept rate
feedback

4 Answers

dpkg -l will give you a list of all the applications installed on a debian based box. For more info, check this page.

Also, dpkg -L <pkgname> shows the files installed for .

link|improve this answer
sorry for the late reply. that works great but what about for Red Hat based installs like CentOs? – blndcat Jul 24 '09 at 16:56
@blindcat - just left an answer with the rpm-based answer – warren Oct 2 '09 at 6:32
feedback

Some other useful tricks: if you install "debian-goodies", you'll have the "dpigs" command to display installed package sorted by disk space usage.

Another useful trick if you want to make several similar installations : use

dpkg --get-selections > installedpackages.txt

On the installed machine then transfer the file to the new machine, and

   cat installedpackages.txt | dpkg --set-selections

Then do

apt-get -u dselect-upgrade

And wait :)

link|improve this answer
1  
Useless use of cat detected; you can do just 'dpkg --set-selections < installedpackages.txt' ;) – janneb Jun 28 '09 at 19:34
Rhaaa I knew it but I was too lazy to check, I just copied and pasted from my notebook :) – wazoox Jun 29 '09 at 10:00
feedback

On CentOS/RHEL/Fedora/etc:

rpm -qa | sort

Query the rpm database for all packages, and put them in alphabetical order :)

Afterwards, I'd rely on using yum to manage the packages, rather than rpm directly, as it will also handle dependencies.

link|improve this answer
feedback

sudo dpkg -l > packageslist

more packageslist

link|improve this answer
dpkg -l doesn't need superuser access. – janneb Jun 28 '09 at 19:27
If u have superuser access it is better to get result – Rajat Jun 29 '09 at 5:38
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.