// get a connection to the agent and tell it to purge the bundle from the file system
Subject overlord = subjectManager.getOverlord();
AgentClient agentClient = agentManager.getAgentClient(overlord, resourceDeploy.getResource().getId());
BundleAgentService bundleAgentService = agentClient.getBundleAgentService();
BundlePurgeRequest request = new BundlePurgeRequest(resourceDeploy);
BundlePurgeResponse results = bundleAgentService.purge(request);
if (!results.isSuccess()) {
String errorMessage = results.getErrorMessage();
failedToPurge.put(resourceDeploy, errorMessage);
}
} catch (Exception e) {