---
title: "MIDISetupRemoveExternalDevice(_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midisetupremoveexternaldevice(_:)"
---

# MIDISetupRemoveExternalDevice(_:)

Removes an external MIDI device from the current MIDI setup.

## Declaration

```swift
func MIDISetupRemoveExternalDevice(_ device: MIDIDeviceRef) -> OSStatus
```

## Parameters

- `device`: The device to remove.

## Return Value

Return Value An OSStatus result code.

## See Also

### Managing External Devices

- [MIDIExternalDeviceCreate(_:_:_:_:)](coremidi/midiexternaldevicecreate(_:_:_:_:).md)
- [MIDISetupAddExternalDevice(_:)](coremidi/midisetupaddexternaldevice(_:).md)
