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.
Uninstall a Flatpak applicationYou can use the uninstall option with the application id to remove the installed Flatpak package.
For those landing here who arent building stuff, /var/lib/flatpak/repo
is also where every flatpak installs ends up, and when you run upgrades it doesn't clean itself up. For --user
installed packages it would be ~/.local/share/flatpak/
.
Discovered that answer on this post.
flatpak uninstall --unused
Before
[root@laptop flatpak]# du -sh .
8.4G .
After
[root@laptop flatpak]# du -sh .
4.3G .
/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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With