listing current application rpm's only [Solved]

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

listing current application rpm's only [Solved]

Postby rodgoslin » Dec 3rd, '17, 21:26

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.
Last edited by rodgoslin on Dec 4th, '17, 13:44, edited 1 time in total.
rodgoslin
 
Posts: 523
Joined: Nov 19th, '11, 01:31

Re: listing current application rpm's only

Postby doktor5000 » Dec 3rd, '17, 23:56

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: listing current application rpm's only

Postby rodgoslin » Dec 4th, '17, 01:38

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'
rodgoslin
 
Posts: 523
Joined: Nov 19th, '11, 01:31

Re: listing current application rpm's only

Postby Ken-Bergen » Dec 4th, '17, 02:16

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. :o
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: listing current application rpm's only

Postby rodgoslin » Dec 4th, '17, 04:19

(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.
rodgoslin
 
Posts: 523
Joined: Nov 19th, '11, 01:31

Re: listing current application rpm's only

Postby Ken-Bergen » Dec 4th, '17, 04:29

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.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: listing current application rpm's only

Postby rodgoslin » Dec 4th, '17, 05:48

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
rodgoslin
 
Posts: 523
Joined: Nov 19th, '11, 01:31

Re: listing current application rpm's only

Postby doktor5000 » Dec 4th, '17, 11:30

Please mark the thread accordingly by editing the topic of the first post and prefix it by [DONE], thanks
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: Google Adsense [Bot] and 1 guest

cron