code: public void deregister(final String serviceId) {
  
          final URI uri = createURI("/service/deregister/" + serviceId);
  
          HTTP.Response response = HTTP.getResponse(uri.toString());
  
          if (response.status() != 200) {
              die("Error removing registration of service with Consul",
                      uri, serviceId, response.status(), response.payloadAsString());
          }
  
      }
docs: Remove registration of a particular service.
  
  @param serviceId the service id that you want to remove.