Flatpak: Unclear where stuff gets downloaded to

Created on 1 Jan 2018  路  6Comments  路  Source: flatpak/flatpak

Having some issues:

# I have enough space in cwd:
me@host:/media/me/Data/foo$ df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5       233G  2.4G  231G   2% /media/me/Data

# Nevertheless, Flatpak fails, telling me "No space left on device"
me@host:/media/me/Data/foo$ flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref
This application depends on runtimes from:
  https://sdk.gnome.org/repo/
Configure this as new remote 'gnome' [y/n]: y
Installing: com.xamarin.MonoDevelop/x86_64/stable
Required runtime for com.xamarin.MonoDevelop/x86_64/stable (org.freedesktop.Sdk/x86_64/1.4) is not installed, searching...
Found in remote gnome, do you want to install it? [y/n]: y
Installing for user: org.freedesktop.Sdk/x86_64/1.4 from gnome
(...)
Downloading files: 1643/5365 20.0 MB (3.3 MB/s)   
error: While pulling app/com.xamarin.MonoDevelop/x86_64/stable from remote com.xamarin.MonoDevelop-origin: fallocate: No space left on device

It would be nice if there was a way for Flatpak to

  • Use a defined location to download stuff (e.g., the current working directory, cwd)
  • Be more verbose about where stuff gets downloaded to

My use case is running Flatpak from Live ISOs, where / is a tmpfs. But as you can see from the above, I have plenty of space available at other mountpoints.

Most helpful comment

In general though, people don't really need to care about where things are, as long as they can install, update, remove and run app.

...except if I want to

  • Move stuff to a different disk because I am running out of space
  • Copy an app to another machine without re-downloading it
  • Storing a collection of all of my apps on a file server
  • Archive stuff
  • etc.

All 6 comments

e.g., the current working directory

That wouldn't work, because then your graphical desktop doesn't run in the same cwd as the terminal in which you're running the command, so it wouldn't be able to find the downloaded apps.

You would also end up downloading things in different directories based on where you were when running the install command, which means you would lose the deduplication from OSTree. (which can only happen if everything is installed in the same local repository)

Use a defined location to download stuff

I've never tried it, but I think that's what the "installations" are for. See the flatpak-installation(5) man page for details.

Be more verbose about where stuff gets downloaded to

For system-wide installs, things get downloaded into /var/lib/flatpak/. Uses-wide installs go into ~/.local/share/flatpak/. In general though, people don't really need to care about where things are, as long as they can install, update, remove and run app.

In any case, the (appropriately named) --verbose option does give this information:

$ flatpak --verbose install flathub ${APPID}
F: Opening system flatpak installation at path /var/lib/flatpak
...

$ flatpak --verbose --user install flathub ${APPID}
F: Opening user flatpak installation at path /home/mathieu/.local/share/flatpak
...

Flatak is fundamentally a managing system, not a manually file downloader. It keeps track of whats installed similar to a package manager and it needs to be in a specific format. The expectation is that you use the flatpak tools to manage these.

If you just want to download things elsewhere you can use the installation feature as @bochecha said, which lets you have multiple places to install to, or you can set up symlinks in the standard locations if you want everything to go somewhere else. (There are also env-vars you can set, but i don't think that is a good idea as it doesn't persist.)

In general though, people don't really need to care about where things are, as long as they can install, update, remove and run app.

...except if I want to

  • Move stuff to a different disk because I am running out of space
  • Copy an app to another machine without re-downloading it
  • Storing a collection of all of my apps on a file server
  • Archive stuff
  • etc.

people don't really need to care about where things are, as long as they can install, update, remove and run app

This makes sense as long as Flatpak is installed and used.

When users decide to remove Flatpak, do they not need to care that it left a few gigabytes worth of runtimes on their system, and where it left them?

Flatpak should either garbage collect runtimes or give users enough information to do it manually. At the moment neither is happening.

@rolfen Very unrelated discussion handled by #506

@TingPing There is no such thing as "very unrelated". Either two issues are related, or they are not, in which case how unrelated they are does not really matter.

But one could rightfully argue that everything is related in our universe.

Anyway, these two issues are related as they both discuss managing or controlling Flatpak's use of storage space. Quoting the OP:

My use case is running Flatpak from Live ISOs, where / is a tmpfs. But as you can see from the above, I have plenty of space available at other mountpoints.

Part of my comment is more relevant to #506, so thank you for pointing this out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edoantonioco picture edoantonioco  路  3Comments

LonelyBirb47 picture LonelyBirb47  路  4Comments

TingPing picture TingPing  路  4Comments

MurzNN picture MurzNN  路  4Comments

rffontenelle picture rffontenelle  路  5Comments