private void cleanBridgeResources() {
    List<CacheServer> cacheServers = internalCache.getCacheServers();

    if (cacheServers != null && !cacheServers.isEmpty()) {
      for (CacheServer cacheServer : cacheServers) {
        CacheServerMBean cacheServerMBean =
            (CacheServerMBean) service.getLocalCacheServerMXBean(cacheServer.getPort());

        if (cacheServerMBean != null) {
          ClientMembershipListener listener =
              cacheServerMBean.getBridge().getClientMembershipListener();

          if (listener != null) {
            ClientMembership.unregisterClientMembershipListener(listener);
          }
        }
      }
    }
  }
Assumption is its a cache server instance. For Gateway receiver there will be a separate method
geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementAdapter.java