code: private void doUndeployModule(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<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            platform.undeployModule(deploymentID, new Handler<AsyncResult<Void>>() {
              @Override
              public void handle(AsyncResult<Void> result) {
                if (result.failed()) {
                  message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
                } else {
                  message.reply(new JsonObject().putString("status", "ok"));
                }
              }
            });
          }
        });
      }
    }
docs: Undeploys a module.