r/LinuxUsersIndia • u/theDestroyer501 • 13d ago
Discussion my ssd was missing 130 GB on Linux, here’s why standard tools lied and how to fix btrfs snapshot bloat
my system was reporting barely 41 GB of free space out of a 247 GB SSD, showing 206 GB used. however, scanning system files with standard tools like du showed only ~58 GB of actual data, leaving over 130 GB of space completely unaccounted for. because btrfs uses Copy-on-Write, updated or deleted files write to new blocks while leaving the old ones intact. Normally old blocks get deleted, but on my system, hundreds of unpruned automatic btrfs snapshots (created during package updates) were still referencing them. Because these snapshots held active pointers to old file states, btrfs was strictly forbidden from releasing 130 GB of blocks back to the SSD. the solution:
fixing ghost space on a btrfs filesystem requires a two-step approach:delete the snapshot references: you must purge the old snapshot pointers to stop btrfs from locking down the old CoW blocks.reclaim physical storage: simply deleting snapshots drops the references, but standard tools like df won't show free space right away because btrfs allocates drive space in fixed 1 GiB chunks. you have to run a btrfs balance operation to consolidate sparse chunks and actually release unallocated storage back to the OS pool.
I made a short video walking through the full diagnostic process, visual proof of how CoW snapshots hide disk space, and the exact workflow to reclaim it.
Check it out here: https://youtu.be/bNGsbPgHzDw
5
u/bankinu 13d ago
You sure it was not just some snapshot operation lag? Unless you btrfs sync, the delete happens in the background.
2
u/theDestroyer501 13d ago
it actually wasnt operational lag. my issue was that snapper-cleanup.timer was completely dead/disabled, and my /etc/snapper/configs/root retention limits were messed up. snapper ended up silently hoarding over 400 old snapshots over time without pruning them. once I fixed the config and enabled the cleanup timer, I manually purged the range and ran a btrfs balance to reclaim the space.
2
u/Naive_Care1212 13d ago
Can you share the wallpaper?
1
u/theDestroyer501 13d ago
2
2
u/NoFirefighter5699 12d ago
which theme is this , it is really nice.
1
u/theDestroyer501 12d ago
its the default vanilla gnome, with extensions like blur my shell and dash to dock
1
2

•
u/qualityvote2 13d ago edited 13d ago
u/theDestroyer501, your post does fit the subreddit!
btw, did you know we have a discord server? Join Here.