Author Topic: How to make a list of installed packages  (Read 1884 times)

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12514
How to make a list of installed packages
« on: September 02, 2009, 01:56:50 PM »
From a terminal, at the prompt;

rpm -qa | sort > installed.txt

This will give a list of all installed packages, in a text file, (installed.txt) in alphabetical order, complete with version.

Thanks to everyone who donates. You keep the servers running.

Offline Linuzoid

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1404
    • LinuzoidArt Studio
Re: How to make a list of installed packages
« Reply #1 on: September 02, 2009, 02:04:13 PM »
Very Cool!  8). Worked like a charm. Thanks Tex. :)
Be very, very kind to your neighbors, but don't take the fence down!

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: How to make a list of installed packages
« Reply #2 on: September 02, 2009, 02:11:51 PM »
There used to be a complete how-to go from that list, taken from a no-network computer, to a computer on the net, get the required updates from the repos and update the computer that did not have net access.  I don't remember if that was at hack or here, but I can't find it now.  There's been a couple posts asking for this kind of thing.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline aherkey

  • Full Member
  • ***
  • Posts: 109
Re: How to make a list of installed packages
« Reply #3 on: September 02, 2009, 04:10:28 PM »
If you work on several servers and a command not found on one of them rather than opening synaptic and hunting down which package the command is bundled in, I use rpm -qf path/filename on the server that has it already installed.

For example nslookup is not installed on one of your servers. Go to the server where it is installed and run this command:
   rpm -qf $(which nslookup)
   bind-utils-9.6.0-1pclos2007
Now go to the other server and install bind-utils.

-Andy

Offline AndrzejL

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 12797
  • RLU #490933
    • Wordpress On The Wardrobe...
Re: How to make a list of installed packages
« Reply #4 on: September 03, 2009, 03:08:37 AM »
You can also use
Code: [Select]
rpm -qa > installed_list.txt
and
Code: [Select]
rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n > installed_sorted_list.txt
OR for those with konsolephobia:



Open synaptic and click on [File] > [Save markings as]. Now when new window comes up type in "installed_packages" (skip the "") in the [Name:] box and then click on the [DESKTOP] button on the left. Next you have to mark the box next to [Save full state, not only changes] at the bottom and then click on [SAVE].

This will create a file on a roots desktop with a list of all packages installed on your system. You can use this list if you want to clone your system on other machine :).

Andy

Offline everge48

  • Sr. Member
  • ****
  • Posts: 383
Re: How to make a list of installed packages
« Reply #5 on: November 25, 2009, 02:17:59 PM »
Nice one, 10-Q!
Any sufficiently advanced technology is indistinguishable from magic.

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2433
  • Any Bugs in site?
Re: How to make a list of installed packages
« Reply #6 on: November 27, 2009, 04:17:45 PM »
http://www.pclinuxos.com/forum/index.php/topic,23721.0.html

If you have come this far you may like to see the 'the expanded topic' on the same interesting topic.

In case you found the file /var/log/rpmpkgs and use this to compare with above, be careful there seem to be a slight difference

Code: [Select]
rpm -qa | sort > installed.txt
In my case sorts so files with first character capital letter will be first, ie VariCAD and varicad will not be listed together.  In the log file /var/log/rpmpkgs those too will be together from what I can see.    

Using the Synaptic method above:
The file created is not sorted and has a second column with the word "install" when I ran it.
« Last Edit: November 27, 2009, 04:26:10 PM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen