Cleaning up old snapshots to free up space

Hey there,
I was just doing some late-spring filesystem cleaning and I noticed a peculiar fact: According to gparted, 450 gigs of my 740 gig home partition are currently used. Running a file indexer in /home/$USER reveals that I’m only using 150 gigs.

Now I’m thinking that my BTRFS snapshots are eating up 250 gigs of disk space, which is rather unreasonable.

How do you find out which snapshots take up the most space and how do you delete them without losing any existing files? I don’t have quotas enabled because last time I had, they ate up 100% of my CPU for hours before I aborted that.

Thanks!

You delete snapshots either with a GUI or by using btrfs subvolume delete. Deleting an older snapshot won’t remove current files. However, be careful not to delete any of your active subvolumes.

It will almost always be the oldest snapshots consuming the space. You can look at exclusive space used by subvolumes but that data can be misleading depending on how you have managed your snapshots over time.

2 Likes

I was a bit reluctant at first, but your solution seems to have worked, thanks a lot!
200 Gigs have returned :slight_smile:

100 Gigs are still used for … something. I assume those are the remains of today’s cleanup.

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