code: public void unregisterService(Database database, String serviceName, String instanceName, String deviceName)
              throws DevFailed {
          String[] services = new String[0];
  
          //	Get service property
          DbDatum data = get_property(database, TangoConst.CONTROL_SYSTEM,
                  TangoConst.SERVICE_PROP_NAME);
          if (!data.is_empty())
              services = data.extractStringArray();
  
          //	Build what to be remove and searched
          String target = serviceName + "/" + instanceName;
          target = target.toLowerCase();
  
          //	Search if already exists
          boolean exists = false;
          Vector<String> v = new Vector<String>();
          for (String service : services) {
              String line = service.toLowerCase();
              int idx = line.indexOf(':');
              if (idx>0)
                  line = line.substring(0, idx);
  
              if (line.equals(target))    // Found
                  exists = true;
              else
                  v.add(service);
          }
          if (exists) {
              //	Copy vector to String array
              services = new String[v.size()];
              for (int i = 0 ; i<v.size() ; i++)
                  services[i] = v.get(i);
  
              //	And finally put property
              data = new DbDatum(TangoConst.SERVICE_PROP_NAME);
              data.insert(services);
              put_property(database, TangoConst.CONTROL_SYSTEM, new DbDatum[]{data});
          }
      }
docs: ===============================================================