After trying to build the gitg flatpak I noticed my /var/lib/flatpak/repo
folder has become very large.
I'm assuming these are build files? Is there a good way to clean these up?
I'm using Flatpak 1.4.0.
/var/lib/flatpak/
& ~/.local/share/flatpak/
are the system & user install location for installed runtimes (e.g. org.gnome.Platform
) and applications (e.g. org.gnome.gitg
). The repo/
directory is where all the checksum-ed binary files are stored, it's like a git repo. They are not the build files unless you include the downloaded org.gnome.Sdk//master
runtime, which would be installed here. But the SDK is shared and not specific to gitg.
If you built with flatpak-builder
they would be in a folder called .flatpak-builder
& the build
folder (what ever you called it). So if you ran the following in a directory like ~/gitg-build-folder/
:
flatpak-builder --force-clean --repo=gitg-repo build org.gnome.gitgDevel.json
Delete ~/gitg-build-folder/build
& ~/gitg-build-folder/.flatpak-builder
to remove any build files produced during building gitg.
If you don't need to build anything in the future you could delete org.gnome.Sdk//master
, however, a lot of the files are de-duplicated as org.gnome.Platform
is also installed. You might also have the *.Debug
SDK extension installed which would take a lot of space.
Answer from duplicate question on Flatpak GitHub: https://github.com/flatpak/flatpak/issues/2945#issuecomment-499498706