I am using fedora 40. fedora has rpm repo. also rpm fusion has free and non-free rpm repos. besides rpm repos fedora has fedora flatpaks repo called registry.fedoraproject.org, also flathub repo called dl.flathub.org. I want to write a script that deletes the rpm packages and installs the equivalent flatpak or flathub packages instead. the reason is that i want to use packages that are in isolated boxes to avoid conflicts, to avoid telemetry and data flow between applications and to avoid conflicts. I am going to write a script that will check the installation names of the rpm packages installed from the fedora rpm repository on my system, if there is a fedora flatpaks equivalent it will delete the rpm package and install the fedora flatpaks package. if there is no fedora flatpaks equivalent it will look for a flathub equivalent, if there is a flathub equivalent it will delete the rpm package and install the flathub package. Then it will do the same for rpm packages installed from rpm fusion free and rpm fusion non-free repos. if there is an equivalent, it will delete the rpm packages and install the equivalent fedora flatpak and/or flathub package. To do this, I need to identify the equivalents of rpm packages and flathub packages and fedora flatpaks packages. I need to prepare the rpm package list and flathub package list and the rpm package list and fedora flatpaks package list. Then I need to match the installation names in these lists and introduce the mathematically equal ones into the script.
for example, the name of audacity in fedora’s rpm repository is audacity . install with
sudo dnf install audacity
the name of audacity in the rpm fusion free rpm repository is audacity . although it is installed with the same command, it is necessary to install it with the following command to separate them:
sudo dnf install --enablerepo=rpmfusion-free audacity
The name of flathub installation is org.audacityteam.Audacity . install with
flatpak install flathub org.audacityteam.Audacity
İnstallation name in the fedora flatpaks repo: org.audacityteam.Audacity .
flatpak install fedora org.audacityteam.Audacity
is installed with the terminal command. in the name matching list I will show the equivalents as follows.
Table example of the list;
fedora-rpm rpm-fusion-free-rpm rpm-fusion-non-free-rpm flathub-flatpak fedora-flatpaks
audacity = audacity = - = org.audacityteam.Audacity = org.audacityteam.Audacity
In this example the names were the same. but I have analyzed hundreds of applications. there are applications with very different names. so it is very important to create this list. So in order to create this script I need a list of all packages in the flathub repository with the installation names of all applications. How can I do it?