<!--
{
  "availability" : [
    "macOS: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSBlockDeviceResource/metadataPurge(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(cs)FSBlockDeviceResource(im)metadataPurge:error:"
  },
  "title" : "metadataPurge(_:)"
}
-->

# metadataPurge(_:)

Synchronously purges the given ranges from the buffer cache.

```
func metadataPurge(_ rangesToPurge: [FSMetadataRange]) throws
```

## Parameters

`rangesToPurge`

The metadata ranges to purge.

## Discussion

This method removes the given ranges from the resource’s buffer cache.
This process drops any dirty data in the cache, preventing the data from reaching the device.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)