public static void removeNearestCatalogRef(String name) {
		Catalog catalog = CatalogRef.findNearestCatalogWithCatalogRef(Util.getCwd(), name);
		if (catalog != null) {
			if (catalog.catalogRef.isURL() && Util.isRemoteRef(catalog.catalogRef.getOriginalResource())) {
				Util.warnMsg("Unable to remove catalog ref " + name + " because it is imported from a remote catalog");
			} else if (catalog.equals(Catalog.getBuiltin())) {
				Util.warnMsg("Cannot remove catalog ref " + name + " from built-in catalog");
			} else {
				removeCatalogRef(catalog, name);
			}
		}
	}
Finds the nearest catalog file that contains a catalog ref with the given
name and removes it

@param name Name of catalog ref to remove
src/main/java/dev/jbang/catalog/CatalogUtil.java