# Teams::cleanup_team_membership_index_for_team_deletion()

Remove this team from every affected user’s membership index (call after the team post is deleted).

```php
cleanup_team_membership_index_for_team_deletion( int $team_id, array $user_ids ): void
```

## Parameters

- `$team_id` (int) Team post ID (used as the key to remove from each user’s list).
- `$user_ids` (array<int>) Users to update (from `get_user_ids_for_team_membership_cleanup()` while the post existed).

## Return

`void`
