As you aware that Non-Global zone are hosted on Global zone on Solaris Operating system. You can check the Non-Global zone list using "zoneadm" command. It will show you are running and installed zones on Global zones.
Please find the below step by step method to remove of local zone from global zone.
Step by Step Method of removal a Non-Global Zone:
First of all you need to check the Non-Global Zone list to ensure which zone is running on the server.
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
1 sunz01 running /zones/sunz01 solaris shared
In the above command output you can see the Non-Global Zone "sunz01" is running, which we need to remove or delete from Solaris Server.
Now, we need to shutdown the required zone which we need to delete. We can shutdown the Non-Global zone using below commands.
--------------------------------------------
global#zoneadm -z sunz01 halt
or
global#zoneadm -z sunz01 shutdown
or
global#zlogin sunz01 shutdown
-------------------------------------------
In next step when your Non-Global zone shutdown you need to uninstall the local zone. You can used the below method to uninstall the Non-Global Zone.
global#zoneadm -z sunz01 uninstall
Using above command Non-Global zone "sunz01" has been uninstall successfully.
In the last step you need to remove or delete all dataset and configuration files of Non-Global zone "sunz01" from Global zone.
global#zonecfg -z sunz01 delete
Using above command all the configuration files related to this Non-Global zone has been deleted successfully. Now you can remove the folder related to this zone.
So using above method we can remove or delete the Non-Global zone from global zone or Solaris Operating system. Please let me know if you are facing any issue during using this process.