---
title: "clearRecentDocuments(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocumentcontroller/clearrecentdocuments(_:)"
---

# clearRecentDocuments(_:)

Empties the recent documents list for the application.

## Declaration

```swift
@IBAction func clearRecentDocuments(_ sender: Any?)
```

## Discussion

Discussion This is the action for the Clear menu command, but it can be called directly if necessary.

## See Also

### Managing the Open Recent Menu

- [maximumRecentDocumentCount](appkit/nsdocumentcontroller/maximumrecentdocumentcount.md)
- [noteNewRecentDocumentURL(_:)](appkit/nsdocumentcontroller/notenewrecentdocumenturl(_:).md)
- [noteNewRecentDocument(_:)](appkit/nsdocumentcontroller/notenewrecentdocument(_:).md)
- [recentDocumentURLs](appkit/nsdocumentcontroller/recentdocumenturls.md)
