Page 1 of 1
listing current application rpm's only [Solved]

Posted:
Dec 3rd, '17, 21:26
by rodgoslin
Is there a simple way of listing installed application rpm packages only? I understand that rpm -qa will list all installed packages, but since most of these will have been installed as a consequence of installing the application rpm, it is an innecesssarly long list.
The reason I ask, is that I'm considering upgrading to Mga6, and I prefer to install this on a clean partition, rather than as an upgrade. If for no better reason than to eliminate the 'cruft' that builds up with time in the root partition. In the past I've used a list of stuff I've installed, in addition to the default installations, but I tend to forget to add things that I've later added, and to have removed from the list, stuff I no longer want. At one time, in Mandrake, it was possible to arrange for the current installs to be loaded on to a file and incorporated in a clean install. I believe I did at one time put this on the forum, but the advice was rather out of date. Like a Victorian cookbook it began, "Prepare a floppy disc", which has little relevance at the present time.
I've no problems with re-setting up stuff like printers, scanners, shares, network settings, etc, but I would like to have the machine set up as it is now.
Re: listing current application rpm's only

Posted:
Dec 3rd, '17, 23:56
by doktor5000
What exactly do you consider "application rpms" ? If you only consider packages that contain .desktop files then you might be missing quite a few packages that only contain binaries without application menu entries.
You can list those packages that contain .desktop files via e.g.
- Code: Select all
rpm --qf "%{NAME}\n" -qf /usr/share/applications/*.desktop|sort -u
rodgoslin wrote:At one time, in Mandrake, it was possible to arrange for the current installs to be loaded on to a file and incorporated in a clean install. I believe I did at one time put this on the forum, but the advice was rather out of date. Like a Victorian cookbook it began, "Prepare a floppy disc", which has little relevance at the present time.
That has always been possible, it just saves the package selection and other settings from the installation. It does not matter whether it's saved to floppy disk or to a USB drive.
Re: listing current application rpm's only

Posted:
Dec 4th, '17, 01:38
by rodgoslin
Thank you Doktor, for your usual quick reply. Unfortunately there were a numberi of snags. Your command line did give a good number of installed applications, but a significant number were missing. The auto install system was quite comprehensive, but going by the content and the creation date of the file, it only dealt with the applications on the original install, and not those subsequently added (or removed).
The Wiki on the subject was also quite comprehensive, as to the the creation of the file, but as far as I was able to ascertain, there was no mention of actually how you would use this file, whether loaded onto a floppy, or a USB stick.
What I was really aiming for was a printable list of all the 'ticked' items in the Software Management page of the Mageia Control Centre, selected for 'All' and 'Installed'
Re: listing current application rpm's only

Posted:
Dec 4th, '17, 02:16
by Ken-Bergen
rodgoslin wrote:What I was really aiming for was a printable list of all the 'ticked' items in the Software Management page of the Mageia Control Centre, selected for 'All' and 'Installed'
- Code: Select all
rpm -qa --qf '%{NAME}\n' | sort > some-file.txt
On my system that is over 2,800 lines long.

Re: listing current application rpm's only

Posted:
Dec 4th, '17, 04:19
by rodgoslin
(Sigh). My score was 2708. Of course, most of these were installed by default, and it's doubtful that I've ever used more than a few percent of them, in all the years I've been running mandrake, mandriva and mageia. It looks like I'm going to go back to my scribbled notes, in "the notebook of things not to forget". I suppose I could edit the file and delete all that didn't come to mind. Thanks for the tip. It's about the nearest I'm going to get. Just as well I'm retired and no longer have to go out to earn a crust.
Re: listing current application rpm's only

Posted:
Dec 4th, '17, 04:29
by Ken-Bergen
For an install of the same version of Mageia a script like
- Code: Select all
#!/bin/sh
urpmi.update -a
while read line; do
urpmi --auto $line
done < some-file.txt
would do.
With a newer version some things may have changed in file naming but it would get you most of the way there.
Re: listing current application rpm's only

Posted:
Dec 4th, '17, 05:48
by rodgoslin
Ah, that wasn't so difficult. I reduced the 2708 lines down to 103. It was largely just a case of holding the delete button down, in kwrite, as the file scrolled by, skipping when something I recognised hove into view. Whole slabs, anything starting lib, I could delete wholesale. I only need the initiating file, so to speak, the rest will install with that
Re: listing current application rpm's only

Posted:
Dec 4th, '17, 11:30
by doktor5000
Please mark the thread accordingly by editing the topic of the first post and prefix it by [DONE], thanks