Robin Gierse
Systems Administrator

Today I learned

Prune unused Flatpak runtimes

1 min read

Today I learned: How to prune unused Flatpak runtimes.

I realized after running and upgrading my system for some time, that the flatpak directory seemed to only be growing and never shrinking or at least staying at the roughly same size. Which prompted me to ask myself: Is there any cleanup happening at all here? And apparently, while everything is kept up-to-date when running flatpak update, sometimes runtimes become unused, meaning they are replaced by newer versions, which are not an upgrade, but an actual replacement or you just uninstalled the last flatpak, that depended on this runtime.

Now flatpak started to automatically uninstall unused runtimes, which are marked end of life, but either that was not the case for me, or I had some relicts lying around, that were just not picked up by the mechanics.

To get rid of possible leftover runtimes, you can simply run flatpak uninstall --unused every now and then. This will safely delete all unused runtimes.