---
title: "AEDeleteItem(_:_:)"
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1447164-aedeleteitem
---

# AEDeleteItem(_:_:)

Deletes a descriptor from a descriptor list, causing all subsequent descriptors to move up one place.

## Declaration

```swift
func AEDeleteItem(_ theAEDescList: UnsafeMutablePointer<AEDescList>!, _ index: Int) -> OSErr
```

## Parameters

- `theAEDescList`: A pointer to the descriptor list containing the descriptor to delete. See doc://com.apple.documentation/documentation/coreservices/aedesclist.
- `index`: A one-based positive integer indicating the position of the descriptor to delete. AEDeleteItem returns an error if you pass zero, a negative number, or a value that is out of range.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion Thread safe starting in OS X v10.2.

## See Also

### Deleting Descriptors

- [AEDeleteParam(_:_:)](coreservices/1444338-aedeleteparam.md)
