# ownership.mayPrune

**Workspace Manager concept example** A working example of the core library. It can change without notice.

- **Module:** ownership
- **Package:** @libtmux/workspace
- **Language:** TypeScript
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/workspace/src/ownership.ts#L51
- **Page:** https://libtmux.org/en/ts/latest/workspace/reference/ownership-mayprune/

```
function mayPrune(
  policy: PrunePolicy,
  owned: boolean,
): boolean
```

Whether surplus topology may be removed.

`owned` is the default because it is the only one that is safe without
knowing where the session came from: a workspace prunes what it built and
leaves alone what it merely found. `always` authorizes pruning for one
operation; it does not stamp or otherwise adopt the session.

## Parameters

- `policy` (`PrunePolicy`)
- `owned` (`boolean`)
