code: private void doInternalUndeployModule(final Message<JsonObject> message) {
      final String deploymentID = message.body().getString("id");
      if (deploymentID == null) {
        message.reply(new JsonObject().putString("status", "error").putString("message", "No deployment ID specified."));
      } else {
        removeDeployment(deploymentID, new Handler<AsyncResult<String>>() {
          @Override
          public void handle(AsyncResult<String> result) {
            platform.undeployModule(result.succeeded() && result.result() != null ? result.result() : deploymentID, createUndeployHandler(message));
          }
        });
      }
    }
docs: Undeploys a module.