As an ajunct to this if the output is changed to;
rpm -q -a --qf '%{NAME} ' | sort -k1,1n > installedstuff.txt
the output is now in a "packagename package-name packagename" format. Can this (somehow) be piped back into the "rpm" command to do a re-install of all the packages. This would be useful to re-install previously installed packages when a fresh build needs to be done (in my case to remove XP totally and have a PURE PClinuxOS PC.
Jim!
Here's another variant, in PCLinuxOS Magazine of September 2007, page 27
http://pclosmag.com/zineshare/200709.pdfIn short:
To build the list (only package names, not versions):
rpm -qa --queryformat '%{name} \n' > ~/Desktop/installed.log
(Note: the single quotes were missing in the article. Typo.)
To reinstall from the list:
apt-get -y install $(cat ~/Desktop/installed.log)
Note: The "-y" makes it ask less questions. It's optional.
If you want to simulate the installation, to se how it would go:
apt-get --simulate -y install $(cat ~/Desktop/installed.log)
Hope it helps
