I am using Pop!_OS 21.10. By default, the Pop!_Shop installs flatpak on user mode, which is annoying because I have multiple users on the system.
I have now added the Flathub repo system-wide, so now I have both sources:
$ flatpak remotes --columns=name,title,url,options
Name Title URL Options
flathub Flathub https://dl.flathub.org/repo/ system
flathub Flathub https://dl.flathub.org/repo/ user
And to avoid future user installations I want to remove the user remote. However, for that I also have to uninstall all the apps installed there:
$ flatpak remote-delete flathub
Remote ‘flathub’ found in multiple installations:
- system
- user
Which do you want to use (0 to abort)? [0-2]: 2
The following refs are installed from remote 'flathub':
- runtime/org.freedesktop.Platform/x86_64/21.08
- runtime/org.freedesktop.Platform.Locale/x86_64/20.08
- runtime/org.freedesktop.Platform.GL.nvidia-470-57-02/x86_64/1.4
- runtime/org.freedesktop.Platform/x86_64/20.08
- runtime/org.freedesktop.Platform.GL.nvidia-470-63-01/x86_64/1.4
- runtime/org.freedesktop.Platform.GL.default/x86_64/21.08
- runtime/org.freedesktop.Platform.GL.nvidia-470-82-00/x86_64/1.4
- runtime/org.freedesktop.Platform.GL.default/x86_64/20.08
- runtime/org.gtk.Gtk3theme.Pop-dark/x86_64/3.22
- runtime/org.freedesktop.Platform.GL.nvidia-465-31/x86_64/1.4
- app/com.skype.Client/x86_64/stable
- runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/21.08
- runtime/org.freedesktop.Platform.Locale/x86_64/21.08
- runtime/org.freedesktop.Platform.openh264/x86_64/2.0
- runtime/org.freedesktop.Platform.GL.nvidia-470-86/x86_64/1.4
- runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/20.08
Remove them? [y/n]:
This is scary because I am not sure which of these packages are installed manually and which were installed as dependencies. The fact that drivers are included also makes me uneasy.
Is there a way to easily migrate, move or reinstall these packages from the user to system remotes? Even better if it keeps the difference between dependencies and manually installed packages, or avoids re-downloading the data.
PS: I am asking this more to find a generic solution than to solve my specific problem, as I couldn't find one online. For my specific issue I installed Chromium system wide and, by what appears to be chance, the last version of all the drivers were also installed. The remaining packages were not related to drivers and thus I felt comfortable to install them manually.