public ContextStatePathDescriptor extractDestroyPaths(ContextPartitionSelector selector) {
ContextStatePathDescriptor states = extractPaths(selector);
for (Map.Entry<ContextStatePathKey, ContextStatePathValue> entry : states.getPaths().entrySet()) {
int agentInstanceId = entry.getValue().getOptionalContextPartitionId();
ContextPartitionDescriptor descriptor = states.getContextPartitionInformation().get(agentInstanceId);
rootContext.deletePath(descriptor.getIdentifier());
ContextControllerTreeAgentInstanceList list = agentInstances.remove(agentInstanceId);
StatementAgentInstanceUtil.stopAgentInstances(list.getAgentInstances(), null, servicesContext, false, false);
list.clearAgentInstances();
rootContext.getFactory().getStateCache().removeContextPath(contextName, entry.getKey().getLevel(), entry.getKey().getParentPath(), entry.getKey().getSubPath());
}