ZFS ZFS dataset already exists

I tried to make a new snapshot for the second time in my life (new to ZFS).

# zfs snapshot -r zroot@snapshot

Code:
cannot create snapshot 'zroot@snapshot': dataset already exists

I'm guessing I need to destroy the old snapshot first, if I want to use the same name again?
(going to use another name from now on, like "srv07-full-snap")

Is it COMPLETELY SAFE to run # zfs destroy -r zroot@snapshot to remove all snapshots named "snapshot"?

Code:
# zfs list -t snapshot
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
zroot@snapshot                          0B      -    96K  -
zroot/ROOT@snapshot                     0B      -    96K  -
zroot/ROOT/default@snapshot          1.22G      -  15.8G  -
zroot/home@snapshot                     0B      -    96K  -
...

# bectl list
(If needed to be taken in account?)

Code:
BE      Active Mountpoint Space Created
default NR     /          20.4G 2026-03-30 11:17

Thanks,
 
Is it COMPLETELY SAFE to run # zfs destroy -r zroot@snapshot to remove all snapshots named "snapshot"?
It depends. Snapshots provide the user a means to view and access (parts or all) of your system storage taken at some previous point in time.

No, if you want to retain these snapshots for further use in the future: once deleted you cannot get it/them back (it does free-up space taken up by the snapshots). However, you do not need to use zfs-destroy(8) just because of the name clash, simply use zfs-rename(8).

Yes, if you want to just free up this particular (recursive) series (you've used zfs snapshot -r zroot@snapshot) of snapshots in this pool identified by 'snapshot'. As you mentioned a more flexible naming scheme for future snapshots will serve you better.

# bectl list
(If needed to be taken in account?)
A Boot Environment (BE) is a special kind of snapshot. You may find something I wrote earlier helpful:
Boot Environment & snapshot - important ZFS features
 
Last edited:
It depends. Snapshots provide the user a means to view and access (parts or all) of your system storage taken at some previous point in time...
Thanks for your answer, much appreciated!! Yes I really need a better naming scheme next time!!
 
Alain De Vos Is beadm a vanilla command?
It's a legacy tool in ports that was replaced in the base-system by bectl
I'm not sure what is meant by "vanilla command", the term is rather imprecise.

The term "legacy" is clearer. However, it may mean different things to different people. I wouldn't call vermaden's sysutils/beadm legacy. bectl(8) was originally inspired by/derived from beadm(8). Further info by vermaden :
  1. Re: changing 15.0 default zroot zfs datasets and partitions?
  2. New ZFS Boot Environments Tool
From #1:
Code:
Date: Wed, 31 Dec 2025 02:01:58 UTC 

There was time when differences between beadm(8) and bectl(8) were quite large ... but after some bugs filled and solved they do (fortunately) mostly the same.

The main differences right now are:

beadm(8):
- written in POSIX sh(1) and awk(1)
- is NOT in the Base System (its in the FreeBSD Ports and/or packages)
- provides 'chroot' option
- provides 'reroot' option

bectl(8):
- written in C
- is in the Base System
- provides 'jail' option

Hope that helps :)

Regards,
vermaden
   [...]
 
Back
Top