Help me decide to delete btrfs snapshots

Hey there,

I am slowly, but surely running out of disk space on my boot drive and I want to clean it up a bit. While doing this, I found out that my .snapshot folder is 221.3 GiB big (using sudo -E QT_XCB_GL_INTEGRATION=none DISPLAY=:0 filelight)

However, when I take a look at snapper I only see the snapshots being 1 GiB big at most

$ sudo snapper list
    # │ Type   │ Pre # │ Date                     │ User │ Used Space │ Cleanup │ Description            │ Userdata
──────┼────────┼───────┼──────────────────────────┼──────┼────────────┼─────────┼────────────────────────┼──────────────
   0  │ single │       │                          │ root │            │         │ current                │
1346* │ single │       │ Sat Apr 19 13:10:29 2025 │ root │   3.39 MiB │         │ writable copy of #1316 │
1449  │ pre    │       │ Wed Jun 18 00:10:30 2025 │ root │   1.05 GiB │ number  │ zypp(zypper)           │ important=yes
1450  │ post   │  1449 │ Wed Jun 18 00:11:36 2025 │ root │  13.84 MiB │ number  │                        │ important=yes
1453  │ pre    │       │ Wed Jun 18 21:14:09 2025 │ root │  92.00 MiB │ number  │ zypp(myrlyn)           │ important=yes
1454  │ post   │  1453 │ Wed Jun 18 21:14:58 2025 │ root │   5.91 MiB │ number  │                        │ important=yes
1455  │ pre    │       │ Thu Jun 19 13:06:52 2025 │ root │   2.61 MiB │ number  │ zypp(zypper)           │ important=no
1456  │ post   │  1455 │ Thu Jun 19 13:06:54 2025 │ root │ 128.00 KiB │ number  │                        │ important=no
1457  │ pre    │       │ Thu Jun 19 13:07:25 2025 │ root │  64.00 KiB │ number  │ zypp(zypper)           │ important=no
1458  │ post   │  1457 │ Thu Jun 19 13:07:25 2025 │ root │  96.00 KiB │ number  │                        │ important=no
1459  │ pre    │       │ Thu Jun 19 13:11:19 2025 │ root │ 256.00 KiB │ number  │ zypp(zypper)           │ important=no
1460  │ post   │  1459 │ Thu Jun 19 13:11:20 2025 │ root │  80.00 KiB │ number  │                        │ important=no
1461  │ pre    │       │ Thu Jun 19 13:11:22 2025 │ root │  80.00 KiB │ number  │ zypp(zypper)           │ important=no
1462  │ post   │  1461 │ Thu Jun 19 13:11:23 2025 │ root │ 256.00 KiB │ number  │                        │ important=no

I think I can delete the snapshots with cockpit quite easily, but I don’t want to mess up my system.

$ sudo btrfs filesystem usage /
Overall:
    Device size:                 463.26GiB
    Device allocated:            434.07GiB
    Device unallocated:           29.19GiB
    Device missing:                  0.00B
    Device slack:                    0.00B
    Used:                        396.24GiB
    Free (estimated):             62.19GiB      (min: 47.60GiB)
    Free (statfs, df):            62.19GiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              447.47MiB      (used: 0.00B)
    Multiple profiles:                  no

Data,single: Size:424.01GiB, Used:391.00GiB (92.22%)
   /dev/nvme0n1p2        424.01GiB

Metadata,DUP: Size:5.00GiB, Used:2.62GiB (52.36%)
   /dev/nvme0n1p2         10.00GiB

System,DUP: Size:32.00MiB, Used:80.00KiB (0.24%)
   /dev/nvme0n1p2         64.00MiB

Unallocated:
   /dev/nvme0n1p2         29.19GiB

@Bird Hi, it is likely not snapshots, but maybe btrfs maintenance not run, journal logs, core dumps etc…

Suggest a read here https://en.opensuse.org/SDB:Cleanup_system and https://en.opensuse.org/SDB:BTRFS#Disk_Space_Full_Because_of_Snapper

2 Likes

Show

btrfs qgroup show /
$ sudo btrfs qgroup show /
Qgroupid    Referenced    Exclusive   Path 
--------    ----------    ---------   ---- 
0/5           16.00KiB     16.00KiB   <toplevel>
0/256         16.00KiB     16.00KiB   @
0/257        149.36GiB    149.36GiB   @/var
0/258         14.89MiB     14.89MiB   @/usr/local
0/259          1.18MiB      1.18MiB   @/srv
0/260        109.44MiB    109.44MiB   @/root
0/261        725.96MiB    725.96MiB   @/opt
0/262        229.85GiB    229.79GiB   @/home
0/263          4.24MiB      4.24MiB   @/boot/grub2/x86_64-efi
0/264         16.00KiB     16.00KiB   @/boot/grub2/i386-pc
0/265         80.00KiB     80.00KiB   @/.snapshots
0/1490        16.00KiB     16.00KiB   @/var/lib/machines
0/1622        16.18GiB      3.43MiB   @/.snapshots/1346/snapshot
0/1725        15.95GiB      1.05GiB   @/.snapshots/1449/snapshot
0/1726        16.09GiB     13.84MiB   @/.snapshots/1450/snapshot
0/1729        16.18GiB     92.00MiB   @/.snapshots/1453/snapshot
0/1730        16.15GiB      5.91MiB   @/.snapshots/1454/snapshot
0/1731        16.15GiB      2.61MiB   @/.snapshots/1455/snapshot
0/1732        16.15GiB    128.00KiB   @/.snapshots/1456/snapshot
0/1733        16.15GiB     64.00KiB   @/.snapshots/1457/snapshot
0/1734        16.18GiB     96.00KiB   @/.snapshots/1458/snapshot
0/1735        16.18GiB    256.00KiB   @/.snapshots/1459/snapshot
0/1736        16.18GiB     80.00KiB   @/.snapshots/1460/snapshot
0/1737        16.18GiB     80.00KiB   @/.snapshots/1461/snapshot
0/1738        16.18GiB    256.00KiB   @/.snapshots/1462/snapshot
1/0           18.70GiB      2.51GiB   <0 member qgroups>
255/1490      16.00KiB     16.00KiB   <0 member qgroups>

@malcolmlewis I’ll read up on your first link, but I already read your second one, which is why I am so confused about my snapshots. I get very inconsistent size values with filelight, btrfs, and snapper. I just want to figure out which folder or file is hogging all my disk space.

I already found a big docker folder (82 GiB) under /var/lib which I will soon remove, because I already uninstalled docker a few months ago…

Either application that you use does not know how to interpret btrfs space consumption or you misunderstand what it says.

The root filesystem in SUSE is located inside of /.snapshots directory. All other filesystems are mounted below this root filesystem.

The snapshot 1346 with path /.snapshots/1346/snapshot is your current root. Which consumes just 16GB. All snapshots of the root in total consume just additional 2GB. But your /home consumes 229GB. /home is not under snapshot management and it is up to you to find out what is inside.

1 Like

I guess you’re right and the snapshots get calculated very weirdly, so I won’t delete them… Deleting the enormous docker folder already helped quite a bit, as I’m now down to 70% usage.

Do not use filelight. It does show wrong calculations for BTRFS. You can google it…

2 Likes

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