# `removeOwner`

## Overview

Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.

<Callout type='warning'>
  This action can only be done via a Safe transaction.
</Callout>

## Usage


<Tabs items={['example.sol']}>
  <Tabs.Tab>
    ```solidity
    interface ISafe {
        function removeOwner(
            address prevOwner,
            address owner,
            uint256 _threshold
        ) external;
    }

    contract Example {
        function example() … {
            (ISafe safe).removeOwner(
                0x...,
                0x...,
                1
            );
        }
    }
    ```

  </Tabs.Tab>
</Tabs>


## Parameters

### `prevOwner`

- **Type:** `address`

Owner address that is pointing to the owner to be removed in the contract [linked list](https://github.com/safe-global/safe-smart-account/blob/7f79aaf05c33df71d9cb687f0bc8a73fa39d25d5/contracts/base/OwnerManager.sol#L19).

<Callout type='info'>
  A linked list is a data structure that allows efficient insertion and removal
  of elements in a list. Each element in it will point to the next one. In Safe
  contracts, the owners are stored in a linked list.
</Callout>

```solidity focus=2
(ISafe safe).removeOwner(
    0x...,
    0x...,
    1
);
```

### `owner`

- **Type:** `address`

Owner address to be removed.

```solidity focus=3
(ISafe safe).removeOwner(
    0x...,
    0x...,
    1
);
```

### `_threshold`

- **Type:** `uint256`

New threshold.

```solidity focus=4
(ISafe safe).removeOwner(
    0x...,
    0x...,
    1
);
```

## Events

### `RemovedOwner`

```solidity
event RemovedOwner(address owner);
```

Emitted when an owner is removed from the Safe.
### `ChangedThreshold`

```solidity
event ChangedThreshold(uint256 threshold);
```

Emitted when the threshold for confirmations is changed.
