To make more room available on your system, use the beadm command to destroy an existing boot environment. The command syntax is as follows:
beadm destroy [-fF] BeName | BeName@snapshot
The command destroys the specified boot environment or snapshot. The command prompts the user to provide confirmation before destroying the boot environment.
–f – Forces destruction of the boot environment even if it is mounted.
–F – Forces destruction of the boot environment without prompting for confirmation.
Note the following specifications:
You cannot destroy the boot environment that is currently booted.
The beadm destroy command automatically removes the destroyed boot environment's entry from the x86 GRUB menu or the SPARC boot menu.
When you destroy an inactive boot environment, any zone boot environments that are associated with that inactive boot environment are also destroyed.
The beadm destroy command destroys only the nonshared datasets of the boot environment. Shared datasets are located outside of the boot environment root dataset area and are not affected when a boot environment is destroyed.
In the following example, BE1 and BE2 share the /tank and /tank/home datasets. The datasets include the following:
# zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 42.5G 24.4G 4.65M /rpool rpool/ROOT 25.6G 24.4G 31K legacy rpool/ROOT/BE1 8.91M 24.4G 4.17G / rpool/ROOT/BE1/var 3.96M 24.4G 276M /var rpool/ROOT/BE2 8.91M 24.4G 4.17G / rpool/ROOT/BE2/var 3.96M 24.4G 276M /var tank 450K 457G 18K /export tank/home 315K 457G 21K /export/home
You would destroy BE2 by using the following command:
# beadm destroy BE2
The shared datasets, rpool/export and rpool/export/home, are not destroyed when the boot environment BE2 is destroyed. The following datasets remain:
# zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 42.5G 24.4G 4.65M /rpool rpool/ROOT 25.6G 24.4G 31K legacy rpool/ROOT/BE1 8.91M 24.4G 4.17G / rpool/ROOT/BE1/var 3.96M 24.4G 276M /var tank 450K 457G 18K /export tank/home 315K 457G 21K /export/home