Deleting logs that are not present in the leader.