Multiple Flathub repos?

I’m not sure if I misconfigured my Flathub repo in Discover.

$ flatpak remotes --show-details
Name    Titel           ADRESSE                                Sammlungskennung Teilmenge Filter Priorität Optionen   Kommentar                Beschreibung                Webseite             Symbol
fedora  Fedora Flatpaks oci+https://registry.fedoraproject.org -                -         -      1         system,oci -                        -                           -                    -
flathub Flathub         https://dl.flathub.org/repo/           -                -         -      1         system     Central repository of F… Central repository of Flat… https://flathub.org/ https://dl.flathub.org/repo/logo.svg
flathub Flathub         https://dl.flathub.org/repo/           -                -         -      1         user       Central repository of F… Central repository of Flat… https://flathub.org/ https://dl.flathub.org/repo/logo.svg
richard@Heidelmut:~$ 

I have to Flathub repos, one for user one for system. Both have multiple packages installed.

Is this correct? Or should I remove one (which?). Can I “rebase” the packages from the removed Flathub repo to the other one?

It’s not correct or incorrect.

With a system remote, the apps are available to all users. With a user remote, the apps are only available for your user.

If you use both, you end up using more storage since the user remote can’t access the runtimes from the system remote.

You can switch all your apps over to the other one. Just need to uninstall the apps from the repo you don’t want anymore and then reinstall it from the other.

Thank you! Is it best to move everything to the system one?
Is there a command to reinstall everything from the other?

This command should print out all apps installed from the user flathub:

flatpak list --app --user --columns=application,origin | awk '$2 == "flathub" {print $1}' | xargs

Verify that it looks right. Then you can run:

flatpak --user remove PUT_THE_PRITNED_OUTPUT_HERE

And finally, to reinstall from the system flathub:

flatpak --system install PUT_THE_PRITNED_OUTPUT_HERE

Optional clean up steps

flatpak --user remove --unused

# this is the only command I'm unsure of, but there's no harm in
# running it so long as you verify the output
flatpak --user remote-delete flathub
1 Like

Worked, thank you!