Installing to ~ rather than /

$ flatpak-builder --user --install build-dir org.flatpak.Hello.yml

When I build a Flatpak I can choose to make it available system-wide or only to the user. I think that in both cases they are installed to / though. Is there a way of installing it to ~? The reason I ask is that I want to make a persistent USB-stick with the Flatpak permanently installed. There isn’t enough space in the root directory and I think the persistence I have achieved only applies to another partition.

No they are not.

User install by default is on ~/.local/share/flatpak/ (that’s the ostree)

1 Like

I only want to install this one 35MB flatpak. This is the error:

Error: While pulling runtime/org.gnome.Platform/x86_64/45 from remote flathub: Delta requires 942.0 MB free space, but only 705.1 MB available
error: Failed to install org.gnome.Platform: While pulling runtime/org.gnome.Platform/x86_64/45 from remote flathub: Delta requires 942.0 MB free space, but only 705.1 MB available
liveuser@localhost-live:~1$

I’ve found a file which states minimum space for something, maybe I could reduce this figure (I only want to install that one flatpak once).

~/.local/share/flatpak/repo/config
[core]
repo_version=1
mode=bare-user-only
min-free-space-size=500MB

Are some files deleted after installation? If so I might still have enough space for the OS to use when running.

You will need the runtime to install/run the app - no way around that. If you were installing multiple apps, it would share parts of this due to filesystem compression, depending on your filesystem.

1 Like

I’ve since realised that I just need to create a certain file in the top-level of the partition I want to make persistent - so I can do this in / of the USB-stick and all the complications with location and space should go away :slight_smile:

I didn’t understand the significance of this post initially. Now I’m wondering whether you are implying that althought the app is installed in /home, the runtime is installed in / and can be shared.

The bash statement that made the partition persistent used piping and a command I’d never heard of. I had no idea what it was doing. Which is why I had so many problems making it work. There’s a lesson here for people offering “help”, present company excepted. The person being helped needs to understand what they’re doing as far as is possible, so make the commands simple and explain what they are doing. Writing a flashy super-complex command to show off your expertise might boost your ego - but it won’t be any help to the reader and might make things much worse.