[api] avoid not reachable backend objects when package destroy throw an exception