LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-28-2021, 02:10 AM   #1
GRS63
Member
 
Registered: Mar 2009
Posts: 87

Rep: Reputation: 1
installed package list


Fedora 34 64 bit Workstatopn.

I want to get a list of "apps" that I have installed on my current system. I would like a list such that I can use as a install script on a new clean install.

There is a list of "Installed Apps" in the "Software" App but I do not know how to makes a text file of it contents. Is there a file located somewhere that contains this information I can copy?

There is also a list of installed Apps under "All applications" in the "Application Finder" App. Again how can I get a txt copy of this information.

Perhaps a copy of the apps as shown under "Activities" "Show Applications"

With either of these it would be easy to edit the txt files(s) to remove the apps installed by the OS so that only those apps installed by the user are in the list for reinstallation.

I now I can use "dnf history userinstalled" piped to a txt file but it needs a lot of editing as it would appear the dependencies of the App are also listed.

A rpm -qa list can also be made.

I recognise that all the respositores that were enabled on the old system would need to be installed on the new system for such a script to work. Also the configuration of the apps would need to be done but this could be made a bit easier by having a copy of the /etc directory from the old system.

It seems to me that such a list would be of great use in thoses cases where one wnats to do a clean new install for an upgrade and then reinstall the apps as per the previous system. So having a file that can be accessed where it just records the App names i.e inkscape calibre or Scribus, that the user and root installs would be a great advantage in recovery or a new clean install from a pervious version. The list would have to include the repository from where it came including Snap and flatpak, RPMfusion, fedora, Google etc.

Thanks
 
Old 12-28-2021, 02:57 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Quote:
Originally Posted by GRS63 View Post
A rpm -qa list can also be made.
Could you state clearly what you find lacking in the rpm -qa list?

Quote:
Originally Posted by GRS63 View Post
The list would have to include the repository from where it came including Snap and flatpak, RPMfusion, fedora, Google etc.
You cannot get this list with one command. rpm -qa will give you list of packages installed as RPMs. That would include packages from Fedora, RPMfusion, probably Google. You can get the list of installed snaps with snap list, and the list of installed flatpaks with flatpak list. If you install all your AppImages to the same directory (manually, or using AppImageLauncher) then listing them is the matter of ls ~/Applications, or whatever that directory is named.

Quote:
Originally Posted by GRS63 View Post
The list would have to include the repository from where it came
What for? Previously, you wrote
Quote:
Originally Posted by GRS63 View Post
I recognise that all the respositores that were enabled on the old system would need to be installed on the new system for such a script to work.
In this case, dnf would happily install packages from any enabled repository. You wouldn't have to explicitly specify repositories on the command line. Anyway,
Code:
dnf -q ls --installed
will give you the list with repos.
 
1 members found this post helpful.
Old 12-28-2021, 06:07 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,151

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
I used to go through such hand-wringing exercises, now I just trundle along until I go to use something and it ain't there - at which point I install it on the new/refreshed system. Great way of getting rid of cruft.
 
Old 12-29-2021, 03:53 PM   #4
GRS63
Member
 
Registered: Mar 2009
Posts: 87

Original Poster
Rep: Reputation: 1
Thanks yes I always back up to a seperate disk.

The rpm -qa list all rpms installed which is fine but what I am looking for is a list of user install "programs" in other words what I am looking for is just the name as in say Rythmbox pr Qcad or gparted. these names are in the Gnome software listing and can be installed by a click on the icon or can be installed through dnf. dnf install -y gparted for example. So it a list of userinsatlled "programs" (some call them Apps) that I am after to use ina Script for installation. rpm -qa seems to give me a list of the "programs" plus all the dependencies. The dependencies get install at the time the "program " is installed o they are not needed for the script.
 
Old 12-30-2021, 03:15 AM   #5
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Ah, so you want to exclude packages that were automatically installed as dependencies of other packages? Try
Code:
dnf -q rq --userinstalled
 
Old 01-03-2022, 01:46 AM   #6
GRS63
Member
 
Registered: Mar 2009
Posts: 87

Original Poster
Rep: Reputation: 1
Thanks again. The
Quote:
dnf -q rq --userinstalled
still gc me a list of useinstalled programs with a lot of extras. Requires a lot of editing to get a list of progam names that can be used in a script such as
Code:
dnf -y install  <progam name>
Ihave however come across a list which does not reqiure much editing
Code:
ls /usr/share/Applications
This mostly requires that the .desktop section be removed, which is very simple and a couple of other eassy edits and I have a list.

There must be other lists as the "Gnome Software" App has a list of "Installed" Apps but I do not know where the file is. Also the "Application Finder" App also shows a list of installed apps but agsin I do not know wehere the file is amd have not been able to find it.
 
Old 01-03-2022, 02:58 AM   #7
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Quote:
Originally Posted by GRS63 View Post
This mostly requires that the .desktop section be removed
Unfortunately, .desktop files not necessarily have the same names as the packages that installed them. But it's easy to get the package names
Code:
rpm -qf /usr/share/applications/*.desktop|sort -u
 
1 members found this post helpful.
Old 01-04-2022, 02:12 AM   #8
GRS63
Member
 
Registered: Mar 2009
Posts: 87

Original Poster
Rep: Reputation: 1
Thanks. Your help has been so valuable. It is a pity that a list of package names is not recorded as they are installed using dnf -y install <name> in a file in the /home diectory (even hidden) so it is backed up and then used as a script to re-install all one's apps after a new clean install so it restores the machine as it was before, It could also be used across some Distros for those who want to try different distro nd yet have the same apps on the system.

If I knew more about programming and Scripts I would have a go at writting something myself. I think it would be best done as part of dnf myself.

Thinking out loud. Any way Thanks again much appreciated
 
Old 01-04-2022, 03:09 AM   #9
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Quote:
Originally Posted by GRS63 View Post
It is a pity that a list of package names is not recorded as they are installed using dnf -y install <name> in a file
Have a look at rpm-cron. It daily records installed packages to /var/log/rpmpkgs via a cron job.
Quote:
Originally Posted by GRS63 View Post
It could also be used across some Distros for those who want to try different distro nd yet have the same apps on the system.
This is much more difficult than it seems at first glance. The same piece of software may be packaged quite differently in other distros. Repology.org collects package statistics across multiple Linux distros, but it doesn't work very reliably. See their explanations under How does it work?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
list installed package files and how to know which package a file belongs bujecas Slackware 3 01-09-2010 03:14 PM
How do I know if a package/list of package is installed redhatwannabe Linux - Newbie 5 05-04-2009 12:57 AM
RPM package manager says package needs to be installed. But I already installed it! nick623 Linux - Software 2 05-24-2005 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration