It’s possible. Because to build flatpaks from source you will most likely development runtimes. And those take some space.
(I still remember with some irritation that one time I tried to be nice and build from source a flatpak application according to the developer preference, using gnome-builder, and in the end having 2GB of development runtimes to build from source a 27MB flatpak app)
Can you do: flatpak list to print all the flaptak applications and runtimes you have installed.
If you are not conformable in having a list of your applications listed here, then maybe you can DM the list to me, or redact applications but leave the runtimes and things related to gnome builder.
Namn Program-ID Version Gren Installation
Markets com.bitstower.Markets 0.5.4 stable system
Tootle com.github.bleakgrey.tootle 1.0.0 stable system
Shortwave de.haeckerfelix.Shortwave 3.0.0 stable system
Spot dev.alextren.Spot 0.3.1 stable system
Freedesktop Platform org.freedesktop.Platform 21.08.16 21.08 system
Freedesktop Platform org.freedesktop.Platform 22.08.2.1 22.08 system
Mesa org.freedesktop.Platform.GL.default 21.3.9 21.08 system
Mesa org.freedesktop.Platform.GL.default mesa-22.1.7 22.08 system
ffmpeg-full org.freedesktop.Platform.ffmpeg-full 21.08 system
openh264 org.freedesktop.Platform.openh264 2.1.0 2.2.0 system
Rust stable org.freedesktop.Sdk.Extension.rust-stable 1.63.0 21.08 system
Rust stable org.freedesktop.Sdk.Extension.rust-stable 1.64.0 22.08 system
GNOME Application Platform version 41 org.gnome.Platform 41 system
GNOME Application Platform version 42 org.gnome.Platform 42 system
Iotas org.gnome.gitlab.cheywood.Iotas 0.1.4 stable system
Adwaita theme org.kde.KStyle.Adwaita 5.15-21.08 system
KDE Application Platform org.kde.Platform 5.15-21.08 system
QGnomePlatform org.kde.PlatformTheme.QGnomePlatform 5.15-21.08 system
QtSNI org.kde.PlatformTheme.QtSNI 5.15-21.08 system
QGnomePlatform-decoration org.kde.WaylandDecoration.QGnomePlatform-decoration 5.15-21.08 system
KeePassXC org.keepassxc.KeePassXC 2.7.1 stable system
LibreOffice org.libreoffice.LibreOffice 7.4.2.3 stable system
Telegram Desktop org.telegram.desktop 4.2.4 stable system
Telegram Desktop Webview Add-on org.telegram.desktop.webview 2.38.0 stable system
So these are development runtimes, they can likely be removed.
About the app tootle, it is currently archived upstream. Meaning that, until development picks up again in upstream it will be stuck in the GNOME runtime version 42, this might be an issue when gnome apps start migrating to the 43 runtime.
You can also install it from apt with: apt install tootle the version in the deb repositories is not that different from the one on flathub.
maybe you can remove the flatpak version and install the apt version and then run again: flatpak remove --unused
One of your flatpak applications from gnome ecosystem, com.bitstower.Markets has not yet updated to GNOME 42, which is why you have two runtimes of GNOME, one for 41 and another for 42:
GNOME Application Platform version 41 org.gnome.Platform 41 system
GNOME Application Platform version 42 org.gnome.Platform 42
Removing com.bitstower.Markets and running flatpak remove --unused would possibly save you about 743,5 MB of space or a bit more. Of course what apps you use is your personal preference, not mine.
And because you have some Qt/KDE applications, you also have the KDE runtimes, which takes about 700MB of space, plus the apps on top
Thanks, I uninstalled Rust stable. Another interesting folder to look at is my ~/.local/share/flatpak, which contain about 4GB of data. As you can see, there are a lot of dirs named 98c144a5445b8f382d86fb856f6457897102b790f1138b7028c741a3eedcb223 etc. Dont know if these are safe to remove too?
purism@pureos:~$ du -sm ~/.local/share/flatpak | sort -nr | head -15
4102 /home/purism/.local/share/flatpak
purism@pureos:~$ du -sm ~/.local/share/flatpak/* | sort -nr | head -15
4068 /home/purism/.local/share/flatpak/appstream
34 /home/purism/.local/share/flatpak/repo
1 /home/purism/.local/share/flatpak/runtime
1 /home/purism/.local/share/flatpak/db
purism@pureos:~$ du -sm ~/.local/share/flatpak/appstream/* | sort -nr | head -15
4058 /home/purism/.local/share/flatpak/appstream/flathub
11 /home/purism/.local/share/flatpak/appstream/gnome-nightly
purism@pureos:~$ du -sm ~/.local/share/flatpak/appstream/flathub/* | sort -nr | head -15
4058 /home/purism/.local/share/flatpak/appstream/flathub/aarch64
purism@pureos:~$ du -sm ~/.local/share/flatpak/appstream/flathub/aarch64/* | sort -nr | head -15
52 /home/purism/.local/share/flatpak/appstream/flathub/aarch64/07da4f798a47517df3993af291a0e0737e038d432556c61ea016f7f021b721c7
26 /home/purism/.local/share/flatpak/appstream/flathub/aarch64/6b0d6d50b4cfca2b105a4f212daa98ca63fb690478c175d1612e1a8a9ab519e5
8 /home/purism/.local/share/flatpak/appstream/flathub/aarch64/3ec74a0d99f8c5f482893d7545dde4f90dbeb4368c23cec7bccb1a79ce9a2d7d
6 /home/purism/.local/share/flatpak/appstream/flathub/aarch64/98c144a5445b8f382d86fb856f6457897102b790f1138b7028c741a3eedcb223
1 /home/purism/.local/share/flatpak/appstream/flathub/aarch64/active
I have now uninstalled some more flatpak apps and managed to shrink /var/lib/flatpak to 6.0GB but ~/.local/share/flatpak remains at 4.1GB which makes me believe that the latter contains a lot of stuff that could be removed. I am just not sure which folders/files that can be safely removed or what I risk if I just delete them all.
EDIT: I see now that I only managed to shrink /var/lib/flatpak from 6.2 to 6.0 GB, which is virtually nothing. How much space should a “normal” flatpak installation with a few apps occupy on the disk?
I have been considering uninstalling flatpak all together and then cleaning out all the flatpak folders and after that reinstalling the apps that I really want from flathub.
p.s. It seems I can’t edit the title of this post to reflect that this is about flatpak folders overflowing and eating up about half of the disk space on the device.
No need to post any of above outputs here (those are of yours only). Above is not helping much either but we do move forward.
EDIT:
Check if there (while I’m not using LibreOffice on Librem 5): ls -l /var/lib/flatpak/runtime/org.kde.Platform/aarch64/ ls -l /var/lib/flatpak/runtime/org.kde.Platform/aarch64/5.15-21.08 or cd /var/lib/flatpak/runtime/org.kde.Platform/aarch64/ ls -la
Anyway please execute (adjust if above not correct):
du -sh /var/lib/flatpak/runtime/org.gnome.Platform/aarch64/41 /var/lib/flatpak/runtime/org.gnome.Platform/aarch64/42 /var/lib/flatpak/runtime/org.freedesktop.Platform/aarch64/21.08 /var/lib/flatpak/runtime/org.freedesktop.Platform/aarch64/22.08 /var/lib/flatpak/runtime/org.kde.Platform/aarch64/5.15-21.08
flatpak uninstall --unused
Check with: du -sh /var/lib/flatpak/runtime/org.gnome.Platform/aarch64/41 if probably gone away, as I hope. Check other related folders the same way.
Check size of: ls -l ~/.local/share/flatpak/repo/tmp/cache.
EDIT II:
On my phone ~/.local/share/flatpak is of size 60K, as checked with: du -sh ~/.local/share/flatpak.
I do not have related appstream folder on my Librem 5. Now I cannot confirm if it was there anyway (before procedure I recommended here to you, but still guess that appstream was there before).
EDIT: @joao.azevedo please go over (check) my advice here in this thread (your previous contribution and proof of my recent posts is important to us).
It turns out I have two instances of Flathub, one system installation and one user installation. The user installation has zero apps installed and I guess that one might have been created during my attempts to build programs with Gnome Builder. This leads me to believe that I should be able to delete everything under ~/.local/share/flatpak without any problems, after deleting the repo from the Purism App Store. Question is if it is enough to just delete it from the repo section, or do I need some other CLI uninstall?
EDIT: I have now removed the flathub user repo in the app store and deleted the entire ~/.local/share/flatpak/appstream folder with seamingly no problems, recovering another 4GB of disk space. I am now looking at the /var/lib/flatpak/appstream/flathub/aarch64 folder wich contains some 660 folders named “.1371b7418a5654528860eaec3df6e3f3261be5de861eeb63e75a3b76fc1fe03c-4TXNM1” etc, all containing three objects; appstream.xml, appstream.xml.gz and the folder icons. Looking into the icons folders, I find between 2500-3000 png files in two folders 64x64 and 128x128, weighing in at 35-45MB. That multiplied by 660 folders add up to 3.6GB in almost 860,000 objects!!!
Maybe a total flatpak wipe and purging everything flathub on the device, followed by a fresh flatpak reinstall of the 4 apps I currently use would clean out most of this space?
EDIT 2: I have now completely uninstalled flatpak and removed the associated folders under /var/lib and ~/.local/share. My free space is now 20 GB. I will likely reinstall flatpak at a later stage if needed and hopefully it won’t totally bloat my system again.