public void purgeBundleDestination(final Subject subject, int bundleDestinationId) throws Exception {
// find the live bundle deployment for this destination, and get all the resource deployments for that live deployment
BundleDeploymentCriteria bdc = new BundleDeploymentCriteria();
bdc.addFilterDestinationId(bundleDestinationId);
bdc.addFilterIsLive(true);
bdc.fetchBundleVersion(true);
bdc.fetchResourceDeployments(true);
bdc.fetchDestination(true);
bdc.fetchConfiguration(true);
List<BundleDeployment> liveDeployments = bundleManager.findBundleDeploymentsByCriteria(subject, bdc);
if (1 != liveDeployments.size()) {