---
name: "deleteGroup"
type: command
status: ok
groups: ["Groups"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/deleteGroup
revid: 330309
updated: 2022-08-30T23:40:39Z
---

# deleteGroup

*Command · Groups · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

Locality: arguments **local** · effect **global**

## Description

Destroys the given group - the group must be empty and [local](../topics/Multiplayer_Scripting.md#locality) to the machine executing this command.

> [!NOTE]
> In Arma 3 you can find out locality of the group with [local](../commands/local.md) command, unlike with previous games. However [owner](../commands/owner.md) and [setOwner](../commands/setOwner.md) don't work with groups anywhere. The group will always be local to the client that created it, until the client disconnects, then the group becomes local to the server. So if you need to delete a group, delete all members first then execute [deleteGroup](../commands/deleteGroup.md) where is it [local](../commands/local.md).

> [!NOTE]
> **Arma 3:** In Arma 3 when the last unit leaves a group, the group gets automatically deleted. Manually deleting all units from a group, however, does **not** automatically delete the empty group. To force the group to get auto-deleted when empty, use [deleteGroupWhenEmpty](../commands/deleteGroupWhenEmpty.md).

## Syntax

```sqf
deleteGroup group
```

**Parameters:**

- `group`: [Group](../topics/Group.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
deleteGroup _group;
```

### Example 2

```sqf
[_group] remoteExec ["deleteGroup", groupOwner _group]; // server only
```

## See also

[deleteGroupWhenEmpty](../commands/deleteGroupWhenEmpty.md) · [isGroupDeletedWhenEmpty](../commands/isGroupDeletedWhenEmpty.md) · [createGroup](../commands/createGroup.md) · [units](../commands/units.md) · [group](../commands/group.md) · [groupFromNetId](../commands/groupFromNetId.md)

## Community notes

**ColonelSandersLite** — 2006-12-17

The deleteGroup Command does not work when there are living members of in the group.  It doesn't error, it simply doesn't do anything.

---

**5133p39** — 2007-07-10

Living or not doesn't matter - you can't delete the group while it contains any units - even dead ones. It takes few seconds until a dead unit is automatically removed from its group.

---

**LongEnoughName** — 2013-09-12

deleteGroup will only delete local groups even if called by server.
Say we have a situation where client creates a group and puts a unit there and later unit dies/gets deleted, server will not be able to delete that empty group until client leaves the game and group ownership switches to server.

<sub>Source: [BI Community Wiki — deleteGroup](https://community.bistudio.com/wiki/deleteGroup) (revision 330309).</sub>
