What items does the "repair" command remove?

I have installed a dozen of applications. When I look at their “Installed size”, their sizes sum up to something around 6.7 GB. After the installation, I checked the size of the Flatpak objects store, ran a repair, and checked again. The “Installed size” output did not change. The numbers in the brackets when running the “repair” command ran to almost a hundred.

  • What files does the “repair” command remove? Where do they come from?
  • What are the numbers in the brackets when the “repair” command runs?
  • Where does the “Installed size” value come from?
  • How to keep track of the space occupied by individual applications and by the whole Flatpak installation?
$ du -sh ~/.local/share/flatpak/repo/objects
5,4G	/home/purism/.local/share/flatpak/repo/objects
$ flatpak --user repair
$ du -sh ~/.local/share/flatpak/repo/objects
4,6G	/home/purism/.local/share/flatpak/repo/objects
$ du -sh ~/.local/share/flatpak/
6,3G	/home/purism/.local/share/flatpak/

This is more of a Flatpak question, not related to Flathub.

If repair didn’t free up space that means there was nothing to prune. You can take a look at man flatpak-repair to see what it does. Installed size is not supposed to change on running repair, the repo (~/.local/share/flatpak/repo/) size may change.

  • What are the numbers in the brackets when the “repair” command runs?

Size of the hash table of all refs.

How to keep track of the space occupied by individual applications and by the whole Flatpak installation?

What do you mean by space occupied by installed applications? Does that count the app’s cache, config etc. ? Or the space occupied by the installation ?

1 Like

Hello. Thank you for the answers!

Sorry, it did not occur to me that my questions may be off-topic here. I now looked at the “About” page which says that it is “a place for Flathub Contributors and Users”. My questions are probably too specific to Flatpak itself. However, the “Contact” page on flatpak.org links here for the forum. I find that confusing.

Forum discourse.flathub.org

Could you suggest a more appropriate forum for general questions about Flatpak and the flatpak command?

I wonder what the “Installed size” in flatpak list --columns=app,size output means. The man flatpak-list does not seem to clarify. I am confused because I summed up the individual “Installed size” of each application and it resulted in a larger size than the objects directory and even the flatpak directory has.

My primary concern is the free space left on the disk. So, anything that occupies it because of Flatpak operation could be of concern. However, I assume that an application installed with Flatpak has some data files, which depend on the application, are supposed to be controlled and managed by such application, and are, hopefully, stored somewhere in the user’s home directory. Instead, I am mostly concerned by the aggregate size of the binaries written to the disk for installation of the application and its dependencies by Flatpak.

Thank you for the suggestion. I have looked through the list of the items being removed per the manual page of flatpak-repair. Why would I have any of those? Is it normal?

I used to run flatpak remove --unused --delete-data regularly. However, when I first ran flatpak --user repair a few days ago, it reduced the size of the flatpak directory threefold due to reduction of the objects directory. Yesterday, I removed all applications and started afresh. Still, right after a fresh installation of the applications, the command freed almost a gigabyte. Is it normal? Should I be concerned? Do you happen to know why are those redundant items not removed automatically and require user interaction if they are not required?

flatpak list --columns name,application,size

It’s the installed size. Doesn’t care about the user data.

1 Like

That’s because there is deduplication. Some data is shared between applications or runtimes by way of ostree.

1 Like