code: public static boolean deleteVM(String hostIpPort, String id) throws TargetException {
  
  		if(id.startsWith("urn:uuid:")) id = id.substring(9);
  		String ret = null;
  		URL url = null;
  		try {
  			CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
  			url = new URL("http://" + hostIpPort + "/" + id);
  		} catch (MalformedURLException e) {
  			throw new TargetException(e);
  		}
  
  		HttpURLConnection httpURLConnection = null;
  		DataInputStream in = null;
  		try {
  			httpURLConnection = (HttpURLConnection) url.openConnection();
  			httpURLConnection.setRequestMethod("DELETE");
  			httpURLConnection.setRequestProperty("Content-Type", "text/occi");
  			httpURLConnection.setRequestProperty("Accept", "*/*");
  
  			in = new DataInputStream(httpURLConnection.getInputStream());
  			ByteArrayOutputStream out = new ByteArrayOutputStream();
  			Utils.copyStreamSafely(in, out);
  			ret = out.toString( "UTF-8" );
  
  		} catch (IOException e) {
  			throw new TargetException(e);
  
  		}  finally {
  			Utils.closeQuietly(in);
  			if (httpURLConnection != null) {
  				httpURLConnection.disconnect();
  			}
  		}
  
  		return ("OK".equalsIgnoreCase(ret));
  	}
docs: Deletes a VM (OCCI / VMWare).
  @param hostIpPort IP and port of OCCI server (eg. "172.16.225.91:8080")
  @param id Unique VM ID
  @return true if deletion OK, false otherwise