How to reinstall flatpak

For some reason my Flatpak installation seems to be borked. Following the Flatpak installation guide shows that the backend seems to be installed, but there is no repository listed in Discover. Only SNAP shows up. In the past, that always showed Flatpack and SNAP. Not sure what happened. The guide mentions installing a Ksettings integration package, which I tried to do, but it kicks up a dependency error:

unpacking kde-config-flatpak (5.27.11-0ubuntu2) …
dpkg: error processing archive /var/cache/apt/archives/kde-config-flatpak_5.27.11-0ubuntu2_amd64.deb (–unpack): trying to overwrite ‘/usr/share/applications/kcm_flatpak.desktop’, which is also in package flatpak-kcm 6.4.4-0zneon+24.04+noble+release+build24
Errors were encountered while processing:
/var/cache/apt/archives/kde-config-flatpak_5.27.11-0ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems a bit silly that a simple desktop file is causing it to fail. Is it safe to just force this? Or should I try to purge Flatpack and try to reinstall the whole thing?

I think you are trying to install the Plasma 5 version of the same config module.

So that is why it conflicts.

Very old version for Ubuntu; Neon was Plasma 6 ages ago…

I didnt even notice that. Seems the instructions are out of date. So what is going on with my flatpak install I wonder? Why does the repository not show up? Any ideas?

The Flatpak package is called flatpak if you want to try reinstalling that.

You can also check in a terminal if the repositories you expect are still known

flatpak remotes

If not, you can add, e.g. flathub

flatpak remote-add --if-not-exists flathub ``https://dl.flathub.org/repo/flathub.flatpakrepo

Thanks. There was indeed no repo, and adding it was successful according to flatpak remote, however, the same problems persisted. Flatpak was not showing up in discover, and attempting to install a program fails with a variety of errors, notably the backend.

So I decided to open Synaptic and manually tracked down the correct file and noticed that the backend was not actually installed. So, I installed it which then showed up in Discover, but there was no repo, so I manually added just the “https…flatpakrepo” in Discover, and it stated working.

So, thanks, I seemed to have solved it. Hopefully it works, though its taking a really long time to download the app. Discover is not giving any feedback about the progress or what it is doing. The only way I know its doing anything at all is via the network monitor.

I am guessing I am going to have to jump through some similar hoops with Snap as it seems to be not working either (I would prefer to use neither, but choice is increasingly limited these days).

It is really unfortunate that you have to do this.

Both Flatpak and Snap work flawlessly from Discover on all my Neon machines.

My Neon install is many years old, and at the time I installed, I think Snap and Flatpak were disabled by default. I suspect none of this would have been an issue with a clean install, but given the years of customizations and tweaks, I hesitate to do that as I barely remember how I did some of them.

Is it just me or is installing flatpak brutally slow? It takes forever to download files and its downloading gigabytes for small files. I am installing chromium ( only use it for google things, not web browsing and have been using a portable (zip file) version but they are acting flaky lately) and so far its downloaded 1.2gb.

Ah, that is possible.

My oldest Neon system has been installed in 2018 and it has both enabled, so I assumed they had always been.

Could be an issue of the mirror you are getting connected to.

There have also been issues with content distributions networks lately (Ubuntu updates, Steam updates, etc) which could also be the problem here.

Flatpak applications share common libraries via special packages called “Runtimes”.

So if this is your first Flatpak application it will likely have downloaded some of these.