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

# wipe(_:completionHandler:)

Wipes existing file systems on the specified resource.

```
func wipe(_ resource: FSBlockDeviceResource, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

## Parameters

`resource`

The [`FSBlockDeviceResource`](/documentation/FSKit/FSBlockDeviceResource) to wipe.

`completion`

A block or closure that executes after the wipe operation completes. The completion handler receives a single parameter indicating any error that occurs during the operation. If the value is `nil`, the wipe operation succeeded.

## Discussion

This method wraps the `wipefs` functionality from `libutil`.
For more information, see the `man` page for `wipefs`.

---

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)