System Disk Space Critically Short

When I created my Fedora system disk partition I didn’t have Flatpaks in mind - they are installed here and use rather more space than RPMs. I am now very short of space.

IMHO Flatpaks are the future, so next time I will create a larger partition, but rather than re-installing the system on another disk now, as a quick fix I have replaced the Flatpaks with RPMs where they are available.

However I don’t seem to have regained any space. I have checked the Flatpak command reference for some sort of purge command, but can’t see one. Am I on the right track and if so how can I do this?

Have you tried flatpak remove --unused ?

Also, if you have a separated /home partition, you could use flatpak --user install <app-name> instead. This way your Flatpaks are per-user but they get stored in ~/.local/share/flatpak/...

Alternatively (and a bit more advanced), you can configure Flatpak to use a custom installation with a different path, see Tips and Tricks — Flatpak documentation

1 Like

What? You have read my question thoroughly, understood it, and given a practical answer. In fact three answers. I’m not sure that is permitted on computer help forums :grinning:

  1. Have you tried flatpak remove --unused ?

An immediate fix. It has removed a Gnome platform which I had been using to develop an application, but which I’m not working on at the moment. It has saved about 1GB, which saves the situation for the moment. [Edit] I think this implies that removed paks don’t leave any junk behind, except perhaps platforms (and configuration files in ~).

  1. use flatpak --user install <app-name>

I remember when I used to use Snaps that they were installed in a visible directory in my home directory - which I really didn’t like. However this is at least hidden, although it means my backups must be arranged to exclude it. It will solve the situation for the short term.

  1. a custom installation with a different path

I think this allows me to put the paks anywhere I like, including a separate disk. No real advantage for me in this.

I have done 1 and will do 2 soon. ASAP I will install Fedora-35Beta on a new disk and double the size of my system partition at the same time. That way system and data will be completely separate and I can just backup the whole of the data disk.
Thanks for your expert help @felipeborges!

@felipeborges borges
Either of these commands works, the ‘flathub’ reference seems optional in this case.

flatpak install com.giuspen.cherrytree
flatpak install flathub com.giuspen.cherrytree

But both of these fail

flatpak --user install com.giuspen.cherrytree
flatpak --user install flathub com.giuspen.cherrytree

wherever in the statement the --user is placed.

docs doesn’t show any detail, but the syntax is correct according to linuxandubuntu

You also need to add the “flathub” remote to the --user installation. Remotes are installation specific.

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

@felipeborges that works. I moved all my paks, but there was still a lot in var/lib/flatpak/repo/objects.

Later…I’ve reinstalled the OS with a much larger system partition.
[/quote]

1 Like