code: public void delete_device(Database database, String deviceName) throws DevFailed {
          if (!database.isAccess_checked()) checkAccess(database);
  
          boolean delete = true;
          try {
              //	Check if device alive before delete
              //------------------------------------------
              String fullDeviceName = "tango://" + database.get_tango_host() + "/" + deviceName;
              DeviceProxy d = new DeviceProxy(fullDeviceName);
              d.ping();
              //	If device alive do not delete
              //------------------------------------------
              delete = false;
          } catch (DevFailed e) { /* */ }
  
          if (delete) {
              DeviceData argIn = new DeviceData();
              argIn.insert(deviceName);
              command_inout(database, "DbDeleteDevice", argIn);
              //System.out.println(deviceName + " deleted");
          } else
              Except.throw_connection_failed("TangoApi_DEVICE_ALIVE",
                      "Cannot delete a device which is ALIVE.", "delete_device()");
      }
docs: ==========================================================================