If you reference a nonembedded GlassFish Server installation using the glassfish-embedded-static-shell.jar file and do not undeploy your applications in the same server life cycle in which you deployed them, expanded archives for these applications remain under the domain-dir/applications directory.
This goal undeploys an application. You can set the parameters described in the following table.
Table 6 embedded-glassfish:undeploy Parameters