Can't delete Snapper snapshots

I have a problem with some Snapper snaphsots that seem to be undeleteable.

These are my current snapshots

Type   | #    | Pre # | Date                     | User | Cleanup | Description    | Userdata      
-------+------+-------+--------------------------+------+---------+----------------+--------------
single | 0    |       |                          | root |         | current        |               
single | 1294 |       | Sat May 20 17:50:10 2017 | root | number  |                |               
single | 1732 |       | Tue Aug 29 00:23:45 2017 | root | number  |                |               
single | 1765 |       | Thu Sep 21 23:45:05 2017 | root | number  |                |               
single | 1767 |       | Fri Sep 22 10:41:32 2017 | root | number  |                |               
single | 1773 |       | Fri Sep 22 19:50:09 2017 | root | number  |                |               
single | 1787 |       | Wed Sep 27 22:40:02 2017 | root |         |                |               
pre    | 1798 |       | Mon Oct  2 16:04:10 2017 | root | number  | zypp(zypper)   | important=yes
post   | 1799 | 1798  | Mon Oct  2 18:46:05 2017 | root | number  |                | important=yes
pre    | 1800 |       | Mon Oct  2 19:03:26 2017 | root | number  | yast sw_single |               
post   | 1801 | 1800  | Mon Oct  2 19:08:02 2017 | root | number  |                |               
pre    | 1802 |       | Mon Oct  2 19:08:23 2017 | root | number  | yast sw_single |               
pre    | 1803 |       | Mon Oct  2 19:11:10 2017 | root | number  | zypp(ruby)     | important=no  
post   | 1804 | 1803  | Mon Oct  2 19:14:32 2017 | root | number  |                | important=no  
post   | 1805 | 1802  | Mon Oct  2 19:14:57 2017 | root | number  |                |               
pre    | 1806 |       | Mon Oct  2 21:46:30 2017 | root | number  | yast snapper   |               
post   | 1807 | 1806  | Mon Oct  2 21:47:01 2017 | root | number  |                |               
pre    | 1808 |       | Mon Oct  2 22:54:14 2017 | root | number  | zypp(zypper)   | important=no  
post   | 1809 | 1808  | Mon Oct  2 22:58:10 2017 | root | number  |                | important=no  
pre    | 1810 |       | Mon Oct  2 23:13:21 2017 | root | number  | zypp(zypper)   | important=no  
post   | 1811 | 1810  | Mon Oct  2 23:14:57 2017 | root | number  |                | important=no  
pre    | 1812 |       | Tue Oct  3 12:41:47 2017 | root | number  | zypp(zypper)   | important=no  
post   | 1813 | 1812  | Tue Oct  3 12:42:09 2017 | root | number  |                | important=no  
pre    | 1814 |       | Tue Oct  3 12:42:26 2017 | root | number  | yast sw_single |               
pre    | 1815 |       | Tue Oct  3 13:03:53 2017 | root | number  | zypp(ruby)     | important=no  
post   | 1816 | 1815  | Tue Oct  3 13:06:26 2017 | root | number  |                | important=no  
post   | 1817 | 1814  | Tue Oct  3 13:06:49 2017 | root | number  |                |               
pre    | 1818 |       | Tue Oct  3 13:07:15 2017 | root | number  | zypp(zypper)   | important=no  
post   | 1819 | 1818  | Tue Oct  3 13:07:21 2017 | root | number  |                | important=no 


The snapshots labeled as “single” (1294 > 1787) are currently undeleteable, I’ve tried to issue the command “snapper delete <number>” but I got a “Deleting snapshot failed” error message.

This is a major problem, because the cron jobs that should automatically cleanup old snapshots seem to fail and abort as soon as they encounter one of these undeleteable ones, leaving my system with a huge amount of unnecessary and redundant snapshots (I had to manually delete the ones between ~1760 and 1797); this takes a lot of space on my root partition and is negatively affecting my system performance.

How can I solve this?

Hi
I’m guessing you have rolled back a few times?

Remember to delete oldest snapshot first.

Try;


btrfs subvolume delete /.snapshots/SNAPSHOTNUMBER/snapshot
rm -rf /.snapshots/SNAPSHOTNUMBER

We all believe what you say of course, but nevertheless copying/pasting the real thing (prompt, command. output, next prompt between CODE tags) is much better. Remember: “show, don’t tell”.

@hcvv

Here is what I did:

$ sudo snapper delete 1294
Deleting snapshot failed.
$


And tried for other snapshot numbers too, with the same result.

@malcolmlewis

Yes, I performed some rollbacks, I wasn’t aware that this could lead to this kind of problems. I will try to do as you say and see if it works

Hm, strange doesn’t sudo ask you to provide the root password?

Yes, it did.

Then, what you “show” is not what you saw. It is more or less fantasy. And that is what the copy/paste of the computer text is all about. :cry:

Hi
Worth a read… :wink:
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.snapper.html

Yast >> Partititioner >> btrfs >> (select volume) >> Edit >> Subvolume Handling >> (find it in existing subvolumes) >> Delete

https://s1.postimg.org/1tentof3iz/Screenshot_20171003_195137.png](https://postimg.org/image/1tentof3iz/)

I’m using openSUSE in italian, so I have omitted the part that was in my language; this does not mean that I’ve posted “fantasy”; like I said, I have simply issued “sudo snapper delete <number>” and got an error message stating that it failed; there is not much more to say, I got no more feedback.

I’ve successfully deleted some of the snapshots with these commands, but when trying to delete 1787, it wiped out my entire root partition and I had to reinstall the system; not a big issue, I keep regular backups of everything important; one could argue that it indeed over-solved the problem the hard way :P; but I still don’t understand why rolling back to a previous snapshot could lead to this kind of problems.

Sorry to bother you again, but you missed my point. It is not so much about this problem of you, but about how to post the most useful information in the forums. This to avoid confusion and to make helping more efficient. And this has also not much to do if we can trust you as a person, but if helpers can trust what problem owners post. Often their stories are just conclusions they jumped to. And the helpers need real computer facts. When possible as seen on the screen by the problem owner.

And wen you are afraid that people will not understand Italian text, then prefix the command by LANG=C, like

henk@boven:~> ls -l aap
ls: kan geen toegang krijgen tot aap: Bestand of map bestaat niet
henk@boven:~> LANG=C ls -l aap
ls: cannot access aap: No such file or directory
henk@boven:~>

Hi
Don’t delete the latest date snapshot that doesn’t have a cleanup description, this will be your rollback one (pseudo first root filesystem) and current.

Not sure if that is covered in the documentation link I posted (perhaps it should be)…?

If for some reason this screenshot invisible I just want to re-add same picture.

http://i111.photobucket.com/albums/n123/boolve/forumui/Screenshot_20171003_195137.png](http://s111.photobucket.com/user/boolve/media/forumui/Screenshot_20171003_195137.png.html)

@hcvv

Thank you for the clarifications.

@malcolmlewis

good to know, next time I’ll be more careful.

http://s019.radikal.ru/i637/1710/7c/65de9a29e36a.png](http://radikal.ru)

hp712:~ # snapper list
Type   | #   | Pre # | Date                          | User | Cleanup | Description  | Userdata     
-------+-----+-------+-------------------------------+------+---------+--------------+--------------
single | 0   |       |                               | root |         | current      |              
single | 893 |       | Thu 24 May 2018 13:39:52 CEST | root |         |              |              
pre    | 949 |       | Wed 29 Aug 2018 13:19:11 CEST | root | number  | yast snapper |              
pre    | 950 |       | Wed 29 Aug 2018 13:19:55 CEST | root | number  | zypp(zypper) | important=yes
post   | 951 | 950   | Wed 29 Aug 2018 13:43:10 CEST | root | number  |              | important=yes
post   | 952 | 949   | Thu 30 Aug 2018 08:32:28 CEST | root | number  |              |              
pre    | 953 |       | Thu 30 Aug 2018 08:37:56 CEST | root | number  | yast snapper |              
post   | 954 | 953   | Thu 30 Aug 2018 10:12:47 CEST | root | number  |              |              
pre    | 955 |       | Thu 30 Aug 2018 10:14:01 CEST | root | number  | yast snapper |              
post   | 956 | 955   | Thu 30 Aug 2018 10:14:21 CEST | root | number  |              |              
hp712:~ # 

I am trying to delete snapshot 893

hp712:~ # snapper delete 893
Deleting snapshot failed.
hp712:~ # 

then tried using

hp712:~ # btrfs subvolume delete /.snapshots/893/snapshot/
Delete subvolume (no-commit): '/.snapshots/893/snapshot'
ERROR: Could not destroy subvolume/snapshot: Operation not permitted
hp712:~ #

If I try using the partitioner, the 893 snapshot doesn’t show up in the snapshot list
(I’ve tried to include a link to the screenshot, but to no avail, sorry)

You’re posting in an old thread, but in any case snapshot 0 points to the current snapshot, your boot snapshot, which I’m pretty sure is 893. You can’t delete your boot snapshot. I don’t recall offhand the command that shows the boot snapshot number, but it is part of the grub configuration and does show on boot.

I like to stress this.

Posting in old threads does not hit many people. Not many will still be watching such old threads. Starting a new one with a good title is the best way to draw the attention of the people you need.

Well, I though that opening a new thread for a problem that had already been addressed was NOT a good idea. Good to know that this is what I should do in the future.