How to delete an illegal snapshot?

I was cleaning up a few old snapshots on my system using yast, most of them worked without any issue but then one reported an error:

Failed to delete snapshot:
org.freedesktop.DBus.Error.Failed; caused by 3 sender=:1.3743 → dest=:1.3745 serial=38 reply_serial=16 path=; interface=; member= error_name=error.illegal_snapshot

I also tried deleting using the btrfs command and that gave this message:

lenore :/.snapshots # btrfs subvolume delete /.snapshots/548/snapshot
WARNING: not deleting default subvolume id 883 ‘/.snapshots/548/snapshot’

Here is the snapshot directory as well as the “btrfs subvolume show” command. Note that the problem snapshot isn’t in the btrfs snapshot list.

lenore :/.snapshots # ls
548 573 586 591 594 597 600 603 606 609 612 615
571 574 587 592 595 598 601 604 607 610 613 grub-snapshot.cfg
572 585 588 593 596 599 602 605 608 611 614

lenore :/.snapshots # ls 548
info.xml snapshot

lenore :/.snapshots # btrfs subvolume show / [0/358]
Name: snapshot
UUID: f4233b32-b98f-e44a-b6df-ace04798e480
Parent UUID: 57f6a6ec-3a4b-7d4c-a88a-cd8e345f4c6f
Received UUID: -
Creation time: 2024-04-09 15:46:29 -0700
Subvolume ID: 883
Generation: 140424
Gen at creation: 119878
Parent ID: 265
Top level ID: 265
Flags: -
Send transid: 0
Send time: 2024-04-09 15:46:29 -0700
Receive transid: 0
Receive time: -
Quota group: 0/883
Limit referenced: -
Limit exclusive: -
Usage referenced: 7.58GiB
Usage exclusive: 16.00KiB

Hi pfmiller0,

Did you try with snapper, as well? Just for information, you may try

snapper list


snapper rm 548

There should be a file /.snapshots/548/info.xml Please check its content. I once had a similar issue, in that case the file was empty. Here’s what I did:

1 Like

Ahh, the “snapper list” is helpful, it shows that snapshot is marked (‘*’) as the current snapshot for some reason, I wasn’t expecting that since it’s a month and a half old. The brtfs command makes more sense with that in mind. That seems like important information that the Yast interface should show.

It looks like snapshot 0 is the one I should boot off of in order to not have any old snapshots tied up, is that correct?

Which is exactly wat btrfs told you from the very beginning:

No, this is virtual and does not exist. I do not know why snapper shows it or how it can be used in snapper commands which do not accept 0 as snapshot number.

And please, use preformatted text to post computer text. Your post is barely readable.

You misunderstand how snapshots work. There is one snapshot (by default it is number 1 immediately after installation) which is your current root and which does not change unless you perform “rollback”. In normal case the current snapshot (the one that you mount as your root) is the oldest one.

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