I am running very low on disk space on my L5. A df -h shows
Filesystem Size Used Free Used % Mounted at
/dev/dm-0 29G 26G 1.4G 96% /
This doesn’t sound right. I regularly clean my system with apt autoremove etc. I also use Bleachbit occasionally (not sure if that is a good idea though).
A du -sm * | sort -nr | head -15 shows the following:
20092 media (my sd card)
11151 home
10114 var
4945 usr
277 boot
22 run
…
Under home I get the following:
224 Pictures
133 Downloads
20 Documents
1 Videos
…
Found one culprit now, my .local directory. 10.3 GB in 1,115,712 objects!!!
Turns out that my ~.local/share/flatpak occupies an insane amount of space. After cleaning with flatpak uninstall --unused it still has 4.3 GB in almost a million files and dirs. The aarch64 directory has almost all of that in countless hidden dirs. Would it be safe to remove these?
Edit: Another culprit is /var/lib/flatpak with 8.5GB of space.
One option to check is: ~/.var/apps that is where all the flatpak apps user data is stored. You will find there directories per app. Depending on the flaptak applications that you use some of those can take some space. In ~/.var/app it is safe to remove directories from flatpak apps that you already uninstalled.
Also when removing flatpaks, did you had any error about flatpaks that might be pined down?
Another thing to check is the journalctl log size.
You can do that with: sudo journalctl --disk-usage
Not that I have noticed. One thing I have done though, is trying to build loupe with Gnome Builder, and the build has never managed to finish due to running out of disk space. Could that have anything to do with the flatpak folders in both ~.local and /var/lib/flatpak?
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