---
title: "FSEventsPurgeEventsForDeviceUpToEventId(_:_:)"
framework: Core Services
role: symbol
role_heading: Function
platforms: [Mac Catalyst 13.1+, macOS 10.5+]
path: coreservices/1447985-fseventspurgeeventsfordeviceupto
---

# FSEventsPurgeEventsForDeviceUpToEventId(_:_:)

## Declaration

```swift
func FSEventsPurgeEventsForDeviceUpToEventId(_ dev: dev_t, _ eventId: FSEventStreamEventId) -> Bool
```

## Parameters

- `dev`: The dev_t of the device.
- `eventId`: The event ID.

## Return Value

Return Value True if it succeeds, otherwise False if it fails.

## Discussion

Discussion Purges old events from the persistent per-volume database maintained by the service. Can only be called by the root user.
