support --delete flag