---
title: "wipe(_:completionHandler:)"
framework: fskit
role: symbol
role_heading: Instance Method
path: "fskit/fsfilesystembase/wipe(_:completionhandler:)"
---

# wipe(_:completionHandler:)

Wipes existing file systems on the specified resource.

## Declaration

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

```swift
func wipe(_ resource: FSBlockDeviceResource) async throws
```

## Parameters

- `resource`: The doc://FSKit/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

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

## See Also

### Implementing essential functionality

- [containerStatus](fskit/fsfilesystembase/containerstatus.md)
