delete_refs(): new function for the refs API