The pkgrm utility described in the pkgrm(1M) man page supports removing packages on a Solaris system with zones installed.
When the pkgrm utility is used in the global zone, the following actions apply.
pkgrm can remove a package from the global zone and from all non-global zones, or from the global zone only when the package is only installed in the global zone.
pkgrm cannot remove a package only from the global zone if the package is also installed in a non-global zone, or remove a package from any subset of the non-global zones.
Note that a package can only be removed from a non-global zone by a zone administrator working in that zone if the following are true:
The package does not affect any area on the non-global zone that is shared from the global zone.
The package is set SUNW_PKG_ALLZONES=false.
To remove a package from the global zone and from all non-global zones, execute the pkgrm utility in the global zone as the global administrator.
A package can be removed from the global zone and from all non-global zones without regard to the area affected by the package.
The following steps are performed by the pkgrm utility:
Package dependencies are checked on the global zone and on all non-global zones. If the dependency check fails, then pkgrm fails. The system notifies the global administrator, who is prompted whether to continue.
The package is removed from each non-global zone.
The package database on each non-global zone is updated.
The package is removed from the global zone.
The package database on the global zone is updated.
As the zone administrator, use the pkgrm utility in a non-global zone to remove a package. The following limitations apply:
pkgrm can only remove packages from the non-global zone.
The package cannot affect any area of the zone that is shared from the global zone.
The package must be set SUNW_PKG_ALLZONES=false.
The following steps are performed by the pkgrm utility:
Dependencies are checked on the non-global zone's package database. If the dependency check fails, then pkgrm fails and the zone administrator is notified. The check fails if either of the following conditions are true.
Any component of the package affects any area of the zone that is shared from the global zone.
The package is set SUNW_PKG_ALLZONES=true.
The package is removed from the zone.
The package database on the zone is updated.