deduplicate apply/remove