[api] make sure we delete invalid backend_packages