#Install flatpaks to different location other than the system partition

40 messages · Page 1 of 1 (latest)

frosty plank
#

I currently have a 250GB SSD as my boot drive and have split it up into a 80GB system partition and the rest of the free space as the home partition.
Additionally, I have another 250GB and 480GB SSDs for additional storage for other applications, games, VMs, etc.

Now recently I have noticed, that my system partition is filling up quite fast and after looking at why this is, noticed, that the installed flatpaks are a big part of this.

Now I know that flatpaks themselves can be installed in the home folder using the cli tool and I have read that other locations are also possible, but I would like to be able to install flatpaks using the Mint Software Manager and have them be installed to a different location, such as to not fill up my system drive as well as timeshift snapshots partition too fast.

I have come across this issue, which seems to imply that this is not possible currently, but I wanted to ask if anyone here has any solutions for my problem.

Thanks in advance!

exotic tulip
#

So where is the default path for flatpak install?

frosty plank
#

AFAIK its /usr/var/lib/flatpak

exotic tulip
#

There is a way to put just that directory on another drive and then put an entry into /etc/fstab so that it mounts at boot. It is very similar to moving home to another drive

#

Might be easier to move /home to another disk as there are plenty of tutorials on that

frosty plank
#

Hmm, but if I move home to another disk, I have a lot of wasted space on the SSD, since although flatpaks use lots of space, it's not 150GB.
I may have a look at what you mentioned with "mounting" the folder

exotic tulip
frosty plank
#

But from what I can tell, the issue I linked above will still persist, right?
Then, I would have to use the flatpak cli to install all flatpaks and can't use the Mint Software Manager.

exotic tulip
#

I am not sure

exotic tulip
#

I may have found a way but it is complex

#

Make a ext4 partition on the other drive and find the name of the partition /dev/sdb2 or whatever it is

#

Post it here

frosty plank
#

I would have to shrink another partition to do this and it is already pretty full.
If you're suggesting to just mount the partition at /usr/var/lib/flatpak, then know that I don't really want to do that, as I do not know how much space I'd have to reserve and I don't want to waste space by making the partition too large, as I need that for other stuff.

exotic tulip
#

Unfortunately even this method may not work as intended as my mission control flatpak isn't working

#

You do have space on another drive?

frosty plank
#

yeah on the existing ext4 partition and I am planning to reorganize my drives, which should also clear up some space

exotic tulip
#

The computer has multiple internal drives?

frosty plank
#

Yeah, 3 SSDs and a HDD, but I want to keep applications on the SSDs

exotic tulip
#

That is good. If you have unused space on another drive the method will still work

frosty plank
#

Which method are you now talking about? Making a dedicated flatpak partition and mounting it at /usr/var/lib/flatpak?

exotic tulip
#

Are you sure it is /usr/var and not just /var?

frosty plank
#

Oh wait, yeah it's /var/lib/flatpak. Sorry, I thought it was nested one deeper

exotic tulip
#

Good

#

Once you get everything reorganized, make an ext4 partition on one of the drives and get the name for it /dev/sd??

frosty plank
#

I don't really want to create a separate partition just for flatpak as I probably have to resize that more often than not and I have wasted space by having two separate partitions for applications on that drive and the reorganizing is something that takes a while and I don't have that amount of time right now.

exotic tulip
#

I will see if a symlink might work for flatpak

last umbra
# frosty plank I currently have a 250GB SSD as my boot drive and have split it up into a 80GB s...

Flatpaks can be installed to the user directory by providing the --user flag ||(e.g flatpak install --user yourPackage )||

This installs them to $HOME/.var/app/. They can also be backed up to USB using the flatpak create-usb command.

Because --user cannot be currently set as the default option, you can instead add Flathub to your user account:

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

After doing this, there should already be a "user" option as a source in Mintinstall. If not, you can remove the system-wide option (This WILL require you to uninstall existing flatpaks and re-install them with --user):

flatpak remove-delete --system flathub

WARNING: Moving from a system install to a pure user installation WILL remove your app data and may be a destructive action to take. It won't brick the system.

frosty plank
hollow wing
#

this solution centers around "mounting" foreign storage devices INTO the main system's filesystem's tree. (Unix/Linux is well known for this ability) A second permanent drive can be had, and the /etc/fstab file tells the system, where to 'locate' it in the file structure via the specified mount point.

#

@frosty plank ^ also a solution

last umbra
frosty plank
frosty plank
last umbra
#

so in theory from what I know, it should show the user and system versions of Flathub as seperate options, like when Flathub-Beta is installed

frosty plank
#

Just tried it with flathub-beta and that shows up as an extra option in mintinstall, but the user installation does not

frosty plank
#

I tried looking through the code of mintinstall and mintcommon and for me it seems like it is only equiped to work with flatpak system installations and not the user one or custom ones

last umbra
#

If all else fails, backup your data ($HOME/.var/app), re-install all your flatpaks with --user and then remove the flathub system repository