code: private void doUndeploy(final Message<JsonObject> message) {
      // If we're undeploying a network then it needs to be handled differently by
      // selecting the node on which the network is deployed.
      String type = message.body().getString("type");
      if (type.equals("network")) {
        doUndeployNetwork(message);
        return;
      }
  
      final String deploymentID = message.body().getString("id");
      if (deploymentID == null) {
        message.reply(new JsonObject().putString("status", "error").putString("message", "No deployment ID specified."));
      } else {
        findDeploymentAddress(deploymentID, new Handler<AsyncResult<String>>() {
          @Override
          public void handle(AsyncResult<String> result) {
            if (result.failed()) {
              message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
            } else if (result.result() == null) {
              message.reply(new JsonObject().putString("status", "error").putString("message", "Invalid deployment " + deploymentID));
            } else {
              vertx.eventBus().sendWithTimeout(result.result(), message.body(), 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
                @Override
                public void handle(AsyncResult<Message<JsonObject>> result) {
                  if (result.failed()) {
                    message.fail(((ReplyException) result.cause()).failureCode(), result.cause().getMessage());
                  } else {
                    message.reply(result.result().body());
                  }
                }
              });
            }
          }
        });
      }
    }
docs: Undeploys a module or verticle.