Solaris 11 – How to Delete a Service Instance
- Check the dependents of the instance to be deleted.
Use the svcs -D command to show instances that depend on this instance. After you delete this instance, dependent instances might not be able to run. Use the svcs -l command to check whether this instance is a required dependency of the dependent instance.
- Mask the instance.
Use the svccfg delete command to mask the instance from normal view. Use the svcs command to show the state of the instance. If the instance is running (is in the online or degraded state), use the svccfg delete -f command to mask the instance from normal view.
$ svcs -H my-svc disabled 7:25:37
$ svccfg delete svc:/site/my-svc:default
- Verify that the instance is masked.
Use the svccfg listcust -M command to confirm that the instance is masked. Commands such as svcs should display an error message that no matching instance is found.
$ svccfg listcust -M
svc:/site/my-svc:default manifest MASKED