r/openSUSE•
podian

Is it safe to remove the first two BTRFS snapshots?

My / partition is running out of space, and I'm wondering if removing the two snapshots created during installation (the "initial" one, and the "post-installation" one) is safe, or can it break something.

Posted Jun 17, 2018, 8:37 AM UTC

57
rbrownsuseopenSUSE Chairman•

How old is your installation?

On modern installations we actually place the installation into snapshot 1, description "first root filesystem"

That is also what we set the boot target to

So, if you deleted it, you'd literally be deleting your root filesystem.. that's not a good idea

You can check which snapshot you are booting to with with `btrfs subvolume get-default /`, don't delete any snapshot that you're booting to ;) (Though, snapper won't let you, and you should use snapper to remove snapshots)

6
podianOPTumbleweed KDE•

My installation is pretty new, like two months, maybe less.

So snapper will only allow me to remove snapshots that don't break stuff, right?

3
rbrownsuseopenSUSE Chairman•

right

3
ParadiesstaubTW, i3•

Did you run balance?
sudo btrfs fi balance --full-balance /

5
podianOPTumbleweed KDE•

I didn't run balance, but as far as I understand it, it doesn't seem like it would change much; the subvolumes don't look really weirdly allocated, the partition is just pretty small and there's a lot of data on it - and the old initial snapshots probably take up a lot of space since the contents of / changed a lot with updates since the installation.

1
ParadiesstaubTW, i3•

For me balance changes a lot (couple of GB's every time I run it). Give it a try.

I don't know if it is possible to delete the initial snapshots using snapper and if any feature relies on the first snapshot being present, but btrfs allows to remove the initial subvolume and only keep snapshots.

2
flyosUser (KDE)•

You can "rebase" the snapshots by rolling "back" to the current snapshot : snapper rollback, then reboot immediately. Removing your old snapshot will then be possible after the reboot.

1