bectl default - Not Any More

The list of boot environments bectl list -c creation inevitably grows. New BEs every version upgrade, and I generally do bectl create before every package upgrade too.

Every so often, I purge much of the old BEs that I will no longer need bectl destroy.

But default always remains the active BE: default NR

With the last upgrade from 14.3 p7 to p8, I messed up with nvidia-drm-kmod, and the easiest thing was to go back to a previous BE and sort out the version. And then I created a new BE. All well.

But now, in my list of BEs default is not the active one, it is the one that I previously reverted to:
Code:
BE                                     Active Mountpoint Space Created                                        
default                                -      -          4.82G 2021-09-08 18:14                               
14.2-RELEASE-p1_2025-02-21_111531      -      -          3.15G 2025-02-21 11:15                               
14.2-RELEASE-p2_2025-04-11_122309      -      -          4.13G 2025-04-11 12:23
14.2p3_all_good_2025060701             -      -          8.51M 2025-06-07 13:25
14.2-RELEASE-p3_2025-06-07_133931      -      -          6.51M 2025-06-07 13:39
14.3-RELEASE_2025-06-07_134559         -      -          8.91M 2025-06-07 13:45
14.3.after.poudirere                   -      -          126M  2025-06-08 13:25
14.3-RELEASE_2025-07-03_084705         -      -          237M  2025-07-03 08:47
14.3-RELEASE-p1_2025-08-08_170835      -      -          217M  2025-08-08 17:08
14.3.p2.before.poudriere.2025-08-14-01 -      -          41.0M 2025-09-14 09:12
14.3.p2.after.poudirere.2025-08-14-02  -      -          18.4M 2025-09-14 09:53
14.3-RELEASE-p2_2025-09-17_185316      -      -          35.3M 2025-09-17 18:53
14.3-RELEASE-p3_2025-10-01_084646      -      -          144M  2025-10-01 08:46
14.3-RELEASE-p4_2025-10-23_120317      -      -          143M  2025-10-23 12:03
14.3.p5.before.poudriere.2025-11-10    -      -          31.1M 2025-11-10 13:37
14.3.p5.after.poudriere.2025-11-12     -      -          21.5M 2025-11-12 07:52
14.3-RELEASE-p5_2025-11-27_154922      -      -          145M  2025-11-27 15:49
14.3-RELEASE-p6_2025-12-24_182436      -      -          147M  2025-12-24 18:24
14.3-RELEASE-p7_2026-01-29_114618      NR     /          42.1G 2026-01-29 11:46
14.3.p8.before.poudriere.2026-01-30-01 -      -          3.91G 2026-01-30 12:05
14.3-RELEASE-p7_2026-01-30_130859      -      -          1.09M 2026-01-30 13:08
14.3.p8.after.poudriere.2026-01-30-05  -      -          1.34M 2026-01-30 13:42

Which BEs can I safely delete, and how can I get back to default as active?

If I set default to be active bectl activate default, will my machine come up as in the same state as my latest BE?

What I want to get to is broadly:
Code:
BE                                     Active Mountpoint Space Created                                        
default                                NR     /         4.82G 2021-09-08 18:14                               
14.3-RELEASE-p7_2026-01-30_130859      -      -          1.09M 2026-01-30 13:08
14.3.p8.after.poudriere.2026-01-30-05  -      -          1.34M 2026-01-30 13:42
 
'default' is just a name. What I already did is to delete the 'default' BE and rename my current BE as 'default'.

Note that I always used sysutils/beadm for that and not bectl (I use this last only for scripting). It should be the same.
 
The list of boot environments bectl list -c creation inevitably grows. New BEs every version upgrade, and I generally do bectl create before every package upgrade too.

Every so often, I purge much of the old BEs that I will no longer need bectl destroy.

But default always remains the active BE: default NR

With the last upgrade from 14.3 p7 to p8, I messed up with nvidia-drm-kmod, and the easiest thing was to go back to a previous BE and sort out the version. And then I created a new BE. All well.

But now, in my list of BEs default is not the active one, it is the one that I previously reverted to:
Code:
BE                                     Active Mountpoint Space Created                                       
default                                -      -          4.82G 2021-09-08 18:14                              
14.2-RELEASE-p1_2025-02-21_111531      -      -          3.15G 2025-02-21 11:15                              
14.2-RELEASE-p2_2025-04-11_122309      -      -          4.13G 2025-04-11 12:23
14.2p3_all_good_2025060701             -      -          8.51M 2025-06-07 13:25
14.2-RELEASE-p3_2025-06-07_133931      -      -          6.51M 2025-06-07 13:39
14.3-RELEASE_2025-06-07_134559         -      -          8.91M 2025-06-07 13:45
14.3.after.poudirere                   -      -          126M  2025-06-08 13:25
14.3-RELEASE_2025-07-03_084705         -      -          237M  2025-07-03 08:47
14.3-RELEASE-p1_2025-08-08_170835      -      -          217M  2025-08-08 17:08
14.3.p2.before.poudriere.2025-08-14-01 -      -          41.0M 2025-09-14 09:12
14.3.p2.after.poudirere.2025-08-14-02  -      -          18.4M 2025-09-14 09:53
14.3-RELEASE-p2_2025-09-17_185316      -      -          35.3M 2025-09-17 18:53
14.3-RELEASE-p3_2025-10-01_084646      -      -          144M  2025-10-01 08:46
14.3-RELEASE-p4_2025-10-23_120317      -      -          143M  2025-10-23 12:03
14.3.p5.before.poudriere.2025-11-10    -      -          31.1M 2025-11-10 13:37
14.3.p5.after.poudriere.2025-11-12     -      -          21.5M 2025-11-12 07:52
14.3-RELEASE-p5_2025-11-27_154922      -      -          145M  2025-11-27 15:49
14.3-RELEASE-p6_2025-12-24_182436      -      -          147M  2025-12-24 18:24
14.3-RELEASE-p7_2026-01-29_114618      NR     /          42.1G 2026-01-29 11:46
14.3.p8.before.poudriere.2026-01-30-01 -      -          3.91G 2026-01-30 12:05
14.3-RELEASE-p7_2026-01-30_130859      -      -          1.09M 2026-01-30 13:08
14.3.p8.after.poudriere.2026-01-30-05  -      -          1.34M 2026-01-30 13:42

Which BEs can I safely delete, and how can I get back to default as active?

If I set default to be active bectl activate default, will my machine come up as in the same state as my latest BE?

What I want to get to is broadly:
Code:
BE                                     Active Mountpoint Space Created                                       
default                                NR     /         4.82G 2021-09-08 18:14                              
14.3-RELEASE-p7_2026-01-30_130859      -      -          1.09M 2026-01-30 13:08
14.3.p8.after.poudriere.2026-01-30-05  -      -          1.34M 2026-01-30 13:42

My opinions only:
you should be able to bectl destroy -o the following
Code:
14.2-RELEASE-p1_2025-02-21_111531
14.2-RELEASE-p2_2025-04-11_122309
14.2p3_all_good_2025060701
14.2-RELEASE-p3_2025-06-07_133931
14.3-RELEASE_2025-06-07_134559
14.3.after.poudirere
14.3-RELEASE_2025-07-03_084705
14.3-RELEASE-p1_2025-08-08_170835
14.3.p2.before.poudriere.2025-08-14-01
14.3.p2.after.poudirere.2025-08-14-02
14.3-RELEASE-p2_2025-09-17_185316
14.3-RELEASE-p3_2025-10-01_084646
14.3-RELEASE-p4_2025-10-23_120317
14.3.p5.before.poudriere.2025-11-10
14.3.p5.after.poudriere.2025-11-12
14.3-RELEASE-p5_2025-11-27_154922
14.3-RELEASE-p6_2025-12-24_182436
14.3.p8.before.poudriere.2026-01-30-01
14.3-RELEASE-p7_2026-01-30_130859
That would leave you with the 3 you say you want, not changing which one is activated.
bectl activate default will set "NR" for the be named default, but there will be no changes to that be.
So if it is broken, it will still be broken.

I routinely do bectl rename so the name of the be represents it's contents. It's a bit of work when you do their freebsd-update because that create a new be that represents the system BEFORE any updates and the update is performed in the current be.
 
The only proper solution.
I'll politely disagree with the "...only..." part. I think "The Best" solution is the one you understand and enforce with zeal.
Example from my standard process:
Fresh install, wind up with a BE named "default" First thing I do is bectl rename to represent what's in it, like 15.0-RELEASE-p0. Then a freebsd-update to cover 15.0-RELEASE-p1 creates a new BE named something like 15.0-RELEASE-p0-timestamp which is before any updates so it's equivalent to my 15.0-RELEASE-p0. The update to -p1 completes in the BE name 15.0-RELEASE-p0 so I bectl rename to 15.0-RELEASE-p1 then bectl rename the timestamped to 15.0-RELEASE-p0.

More work for me? Sure.
But the end result is I have a bunch of BEs named with their "freebsd-version".
For me a BE named default I look at and go "what's in there".

Just like directory naming, BE naming only needs to make sense to you. Anything anyone else says is food for thought.

Above is just my opinion, based only on what works for me and my brain patterns.
 
Is the general consensus that it is safe to bectl destroy -o default?

I have already done bectl create 14.3.p8.after.poudriere.2026-01-30-05.

Can I now?:
bectl activate 14.3.p8.after.poudriere.2026-01-30-05
bectl destroy -o default
bectl destroy -o (everything up to and before 14.3.p8.after.poudriere.2026-01-30-05)
bectl rename 14.3.p8.after.poudriere.2026-01-30-05 default
bectl create 14.3.p8.after.poudriere.2026-01-31-01 just so I know where I am.
 
In general, it's "safe" to bectl destroy any BE that is not the currently active one. It may not be wise to, but it's safe.
If you know that 14.3.p8.after.poudriere.2026-01-30-05 works, I would bectl activate it, reboot into it and then bectl destroy -o everything else (including default), then bectl rename and bectl create.

So yes, your steps in #6 should be fine, I just tossed in a reboot after the activate. Why? You can't delete the BE you are currently in, so a little bit of extra safety.
 
Code:
BE                                    Active Mountpoint Space Created
default                               NR     /          19.5G 2026-01-30 13:42
14.3.p8.after.poudriere.2026-01-31-01 -      -          1.93M 2026-01-31 16:16

I appear to have my head above water.

Will probably dive into 15.0 in a few days.
 
Code:
BE                                    Active Mountpoint Space Created
default                               NR     /          19.5G 2026-01-30 13:42
14.3.p8.after.poudriere.2026-01-31-01 -      -          1.93M 2026-01-31 16:16

I appear to have my head above water.

Will probably dive into 15.0 in a few days.
When going to a new release, you can create a new BE and upgrade into it (the freebsd-update and pkg commands have a chroot option) so you can create a complete BE without rebooting. There have been a few threads here where I've shared my steps and vermaden has a post on his blog with his steps.
 
Back
Top