def METHOD_NAME() -> list[str]:
    search = None
    indexed_package_ids = []
    while search is None or len(indexed_package_ids) < search['count']:
        search = logic.get_action('package_search')({}, {
                'q': '*:*',
                'fl': 'id',
                'start': len(indexed_package_ids),
                'rows': 1000})
        indexed_package_ids += search['results']
    package_ids = {r[0] for r in model.Session.query(model.Package.id)}
    orphaned_package_ids = []
    for indexed_package_id in indexed_package_ids:
        if indexed_package_id['id'] not in package_ids:
            orphaned_package_ids.append(indexed_package_id['id'])
    return orphaned_package_ids