Is there a way to list all the apps I have installed?
Not AFAIK. It would be possible to save a list of installed packages, but that would not show applications installed through other means, like google-earth.
To list all installed packages:
zypper search -is | less
Or
rpm -qa | less
Hmm, before I do my fresh install I would like a list so I know what to reinstall afterwards…
I groped blindly around and came up with:
rpm -qa | sort > Documents/rpmlist
Most of the results I don’t recognise, but I guess it will have to do…
TY for this,
zypper search -is
does the job…
I think…
First of all, this is implemented in YaST’s software installation module (“Export” IIRC, not difficult to find).
Secondly, this here
is the right idea but has some problems.
-
You get every package in one line so for example a “zypper install $(cat rpmlist)” will not work.
-
This will include gpg-keys which can not be installed in that way as there is no package called gpg-pubkey-whatever
-
The exact versions/releases are included, not too good if you want to have that list for different “states” of your install (different versions, one has had its online updates already, the other one doesn’t or even the fun one, you have packages which don’t exist any more in that version, yes this can happen frequently).
I don’t want to throw a “ready made” solution at you, but as a hint, read the section about “–queryformat” in “man rpm”, think about “grep” to get rid of gpg-pubkeys and think about “tr” to change linebreaks/newlines into spaces.
- You get every package in one line so for example a “zypper install $(cat rpmlist)” will not work.
Do you mean to write you get one package per line? But in fact interpolating newline separated output with $(cat rpmlist) will work because newline is a legal argument separator in the shell (see $IFS in man bash), it’s just that when typed in it becomes a command terminator. To demonstrate this to yourself, do:
ls -d $(ls -1)
That’s a one, not an ell in the $(ls -1) to get one line per file or directory.
However zypper install $(cat rpmlist) will fail for other reasons that you have stated.
When you say “not difficult to find” you must remember that blindly bashing about can lead to a lot of places, few of which are the desired destinations. It is not “intuitive” if someone wants a list of installed packages to open yast, select “software management”, then go “file” and “export”.
Besides, if I do, I get this:
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kbuildsycoca4 running...
kbuildsycoca4(8022)/kdecore (KSycoca): Trying to open ksycoca from "/var/tmp/kdecache-root/ksycoca4"
kbuildsycoca4(8022) kdemain: Emitting notifyDatabaseChanged ()
klauncher(8016)/kdecore (KSycoca): Trying to open ksycoca from "/var/tmp/kdecache-root/ksycoca4"
kded(8019)/kdecore (KSycoca): Trying to open ksycoca from "/var/tmp/kdecache-root/ksycoca4"
kio_trash(8026)/kdecore (KSycoca): Trying to open ksycoca from "/var/tmp/kdecache-root/ksycoca4"
knotify(8034)/kdecore (KSycoca): Trying to open ksycoca from "/var/tmp/kdecache-root/ksycoca4"
kded(8019): registerObject() successful for "phononserver"
kbuildsycoca4 running...
(8050)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/kde4/koffice.desktop" has Type= "Application" but no Exec line
(8050)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/YaST2/tv.desktop" has Type= "Application" but also has a X-KDE-Library key. This works for now, but makes user-preference handling difficult, so support for this might be removed at some point. Consider splitting it into two desktop files.
(8050)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/YaST2/sound.desktop" has Type= "Application" but also has a X-KDE-Library key. This works for now, but makes user-preference handling difficult, so support for this might be removed at some point. Consider splitting it into two desktop files.
(8050)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/YaST2/joystick.desktop" has Type= "Application" but also has a X-KDE-Library key. This works for now, but makes user-preference handling difficult, so support for this might be removed at some point. Consider splitting it into two desktop files.
(8050)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/YaST2/groups/apparmor.desktop" has Type= "Application" but no Exec line
(8050) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
kded(8019)/kdecore (KSycoca): Trying to open ksycoca from "/var/tmp/kdecache-root/ksycoca4"
YaST got signal 11 at YCP file /usr/share/YaST2/clients/sw_single.ycp:657
/sbin/yast2: line 454: 7909 Segmentation fault $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS
Which does not mean a lot to me ATM
Ty for the tips though
Try
rpm -qa
TY Colao, but above I mentioned:
rpm -qa | sort > Documents/rpmlist
I see, well what would be more intuitive to you if you want to “export” your packages into a “file”?
Don’t worry, it works at least here™.
But still, the xml-file created seems to include versions, that might be a problem for some scenarios.
Don’t actually know, why I had problems last time even after removing gpg-keys and versions with the “one package per line”-style of my rpmlist, most likely something I missed/messed up. Since then I always used the version of removing gpg-keys with grep and then putting it together into one line with tr, but I will try that next time.
How would I (or anyone) know that they wanted to “export” “packages” into a “file”
“Never attribute to malice that which can be adequately explained by stupidity.” (R.J. Hanlon)
Yup, works with one package per line (don’t ask, why I had problems with that approach some time ago).
So it boils down to
- use rpm -qa together with --queryformat so ONLY the name of all packages will be written
- removing the gpg-pubkey-whatever entries with grep
and forget about tr to glue it together, that’s not needed.
On 2010-10-18 00:36, Akoellh wrote:
> wakou;2239606 Wrote:
>>
>> rpm -qa | sort > Documents/rpmlist
> is the right idea but has some problems.
I would use that list to see which of those rpms install something in “*bin/”, sort the list,
eliminate duplicates, and thus, get the list of rpms containing programs.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)