---
title: "MIDIDeviceRemoveEntity(_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midideviceremoveentity(_:_:)"
---

# MIDIDeviceRemoveEntity(_:_:)

Removes an entity from a device.

## Declaration

```swift
func MIDIDeviceRemoveEntity(_ device: MIDIDeviceRef, _ entity: MIDIEntityRef) -> OSStatus
```

## Parameters

- `device`: The device to update.
- `entity`: The entity to remove.

## Return Value

Return Value An OSStatus result code.

## Discussion

Discussion Drivers call this function to remove one of a device’s entities.

## See Also

### Managing Entities

- [MIDIDeviceNewEntity(_:_:_:_:_:_:_:)](coremidi/mididevicenewentity(_:_:_:_:_:_:_:).md)
- [MIDIEntityAddOrRemoveEndpoints(_:_:_:)](coremidi/midientityaddorremoveendpoints(_:_:_:).md)
