Added logic to delete stale registration if the package
being deleted is the last version for the package Id