Tumbleweed keeps running out of space

Hi, I’m having trouble with this one Tumbleweed install… I have TW in several computers but only on my wife’s laptop this is happening, specifically it keeps running out of space. Gnome tells her it’s running out of space and Chrome will just shut down out of the blue. Then I check the flatpak cache and that’s what seems to be eating up space - I delete it and then it’s fine again for a while. Until it happens again.

I’ve heard btrfs can be a PITA when it comes to space management, and I have accordingly set up more stringent snapper controls and btrfs maintenance (like daily defrag and balance etc), and even a startup script to remove the flatpak cache stuff. On the other hand, I think she doesn’t log out / turn off her computer for days / weeks, and I think it’s kind of weird to have to tell her to do that when I do basically the same thing and I never have an issue. Her system has a 240GB SSD and there aren’t that many files and apps installed. Again, I have flatpaks in my other installations, one of which has even less root SSD space, and this never ever happens.

Should I just… Reinstall the system with ext4? Or is there something else I could/should try first?

You can start by looking at what snapshots are on the drive. Try:

sudo snapper list

You can probably delete snapshots older than a few days ago. I usually manually do some cleanup after running updates - there’ll be two snapshots made (at least) - a ‘pre’ and a ‘post’. Those can be deleted in pairs.

Showing us the output of:

sudo fdisk -l

Also will help us see what the partition structure is and how much space is allocated.

btrfs is fine, but depending on how much space is allocated to the root partition, the config might need some tweaking.

I’ve been running Tumbleweed for years on a 250GB system drive, and it barely uses a quarter of that space with no special maintenance necessary. (I don’t use Flatpaks, though.) I would try lowering snapper’s space limit and/or the number of snapshots to keep and see if that gets the problem under control before reformatting the drive.

“which” Flatpak cache??

The one that is found in the path of:

~/.cache/flatpak

??
I just checked mine … it contains a whopping 6 (six) megabytes :slight_smile:

@petersonsilva Hi, so how are the flatpaks installed, as system or user? If system then it’s likely being included in the snapshots. Suggest you look at installing as user if this is the case…

Thank you all so much for the responses! I’ll address them in order:

@hendersj ‘sudo snapper list’ yields 6 snapshots: current, the first root filesystem, and 2 pre-post pairings from updates; together they occupy no more than 4 GB of space. I remember a few weeks ago I reduced the number of snapshots the system is supposed to keep so I knew this wouldn’t likely be the problem if I experienced the issue again.

‘sudo fdisk -l’ yields this:

Disco /dev/sda: 223,57 GiB, 240057409536 bytes, 468862128 setores
Modelo de disco: ADATA SU650     
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: gpt
Identificador do disco: 61364546-53EC-42B5-82EB-45F3B5E3030F

Dispositivo    Início       Fim   Setores Tamanho Tipo
/dev/sda1        2048   1050623   1048576    512M Sistema EFI
/dev/sda2     1050624 464666623 463616000  221,1G Linux sistema de arquivos
/dev/sda3   464666624 468862094   4195471      2G Linux swap

@amiya “I would try lowering snapper’s space limit and/or the number of snapshots to keep and see if that gets the problem under control before reformatting the drive” - Unfortunately I’ve already done that :confused:

@myswtest no, (one of) the system one(s), found in: /var/lib/flatpak/repo/tmp/

This specific place had tons and tons of GB used and I could not for the life of me found online what they were for - I could only find people telling others with similar issues that it was ok to delete the flatpak-cache-* files found inside this dir.

@malcolmlewis they are installed as system. Is there a way to just change this without reinstalling the apps - especially without losing their settings? I wonder if it’s going to help much though if the same apps keep producing the horrendous amount of cache they have in the past. Is there a way to check how much space each flatpak is individually taking for their cache?

Thanks for the followup. I just checked that path’s content. It’s empty.

I then fired up four apps installed as Flatpaks and did a little bit of work in each, then checked that …/tmp/* path … still empty.

Or course, my Flatpaks are not installed as system-wide, but user specific (while logged in as the user, using Discover). Even so, the Flatpak cache path in the user’s home sub-dir still has an insignificant size, about 10mb.

Maybe ask your wife which apps she uses most, then start each one up individually (not all at once), then monitor disk usage over time. There could be a “rogue” app with some odd disk usage leak.

Wow … it never ends, does it … this is a followup to my last post with info I have just discovered.

There are other Flatpak caches … Obviously, this one is in my user home subdir:

~/.local/share/flatpak/repo/tmp/cache/

And, I discovered this, completely by accident:

myuser@machine :~>  ll /var/tmp/
total 0
drwxr-xr-x 1 myuser  users 32 Feb 22 08:13 flatpak-cache-017A22
drwx------ 1 root    root   6 Feb 22 08:10 systemd-private-3c1d204ecfb34e579264
... snipped ...

Notice that Flatpak cache is owned by my user account, but in /var/tmp

Again, I did my “run four Flatpak apps” test and neither of those additional cache subdirs contained data (oddly).

I suspect that some Flatpak apps might store a cache in the path where the Flatpak app is installed (maybe).

Thank you! Honestly from her app list the one she uses basically all the time is Chrome (while the others are basically left alone - unless we’re talking about mesa, kde base software, etc.). But then again even if it were a “rogue” app I wouldn’t be able to just uninstall it. I might try installing it from the rpm (migrating the user profile) to see if it helps.

(I’ve modified your post to use preformatted text formatting to make the fdisk output more readable)

Looks like the full system is set up on a single partition. (EFI is for boot, and swap is separate, but home directories and root are all in sda2).

What is the output of sudo snapper list-configs? (Probably just root, but worth checking)

Also, it would be useful to see the output from snapper list - that includes space usage info for each snapshot, and that could be useful to see. Please use preformatted text (the </> button in the editor toolbar - or you can put “```” on the line before and the line after (without the double quotes), and that will do the formatting as well).

Hi, sorry about the formatting!

Yes, list-configs shows it’s only root (although, yes, that means root includes home)

Still, she doesn’t mess much with the files, they’re photos and documents and stuff that are here for backup purposes, it’s mostly online work.

The output of snapper list is:

sudo snapper list
  # │ Tipo   │ Pre # │ Data                     │ Usuário │ Espaço usado │ Limpeza │ Descrição             │ Dados de usuário
────┼────────┼───────┼──────────────────────────┼─────────┼──────────────┼─────────┼───────────────────────┼─────────────────
 0  │ single │       │                          │ root    │              │         │ current               │
 1* │ single │       │ seg 22 jul 2024 10:22:06 │ root    │    20,53 MiB │         │ first root filesystem │
72  │ pre    │       │ sáb 08 fev 2025 13:46:29 │ root    │     3,51 GiB │ number  │ zypp(packagekitd)     │ important=yes
73  │ post   │    72 │ sáb 08 fev 2025 14:18:14 │ root    │    16,23 MiB │ number  │                       │ important=yes
74  │ pre    │       │ sáb 08 fev 2025 14:18:54 │ root    │   740,00 KiB │ number  │ zypp(zypper)          │ important=yes
75  │ post   │    74 │ sáb 08 fev 2025 14:19:08 │ root    │     5,71 MiB │ number  │                       │ important=yes

No worries on the formatting :slight_smile:

Yeah, number 72 isn’t too bad overall, if things are running well, you could delete 72/73, but that’s probably not necessary.

Something else you might try us running sudo zypper cc - I just upgraded an old laptop yesterday from 15.2 to 15.6, and during the upgrade, it ran out of space. I noticed that the zypper cache had a bunch of stuff from disabled repos, and that actually freed up a significant amount of space during the upgrade.

Something else that will help identify where the space has gone is to run:

sudo du -h --max=1 -x / | sort -h

Then drill down one level at a time on the directories that look the largest. Don’t just start deleting stuff (obviously), but that can help isolate where the space is going and be useful as a diagnostic to figure out what’s eating the space up.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.