Caution - Use this procedure with caution. The action of removing all of the files in the zone's root file system is irreversible. |
The zone cannot be in the running state. The uninstall operation is invalid for running zones.
You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
global# zoneadm list -v
You will see a display that is similar to the following:
ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - my-zone installed /zones/my-zone solaris excl
You can also use the –F option to force the action. If this option is not specified, the system will prompt for confirmation.
global# zoneadm -z my-zone uninstall -F
Note that when you uninstall a zone that has its own ZFS file system for the zonepath, the ZFS file system is destroyed.
global# zoneadm list -iv
You will see a display that is similar to the following:
ID NAME STATUS PATH BRAND IP 0 global running / solaris shared
Troubleshooting
If a zone uninstall is interrupted, the zone is left in the incomplete state. Use the zoneadm uninstall command to reset the zone to the configured state.
If the zonepath is not removed, this could be an indication that this zone is installed in another boot environment. The zonepath and various datasets that exist within the zonepath dataset are not removed while a boot environment exists that has an installed zone with a given zonepath. See beadm(1M) for more information about boot environments.
Use the uninstall command with caution because the action is irreversible.