Improved delete tag snippet: now you can delete by id or by search