# remove-proxies (/docs/tx/remove-proxies)

A cleanup/panic switch: all delegates lose access in one call and all proxy
deposits are returned. Careful if this account spawned pure proxies — they
are controlled *through* delegations, so removing everything can strand them
permanently (there is no key to recover a pure proxy with).

| Signer    | Origin                                 | Pallet | Wraps                                                              |
| --------- | -------------------------------------- | ------ | ------------------------------------------------------------------ |
| `coldkey` | signed account (pallet role may apply) | Proxy  | [`Proxy.remove_proxies`](/code/pallets/proxy/src/lib.rs#L304-L310) |

## Parameters [#parameters]

This operation takes no parameters.

Address parameters (`--hotkey`, `--coldkey`, `--dest`, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.

## CLI [#cli]

Preview with `--dry-run` (shows fee, effects, and policy result without
submitting), then submit:

```bash
btcli tx remove-proxies --dry-run
btcli tx remove-proxies -w my_coldkey
```

## Python [#python]

```python
import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.RemoveProxies()

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)
```

(`bt.Subtensor` is also the async client — `async with bt.Subtensor() as client:`
— see [The client](/docs/concepts/client).) Or build the intent by op name, as
an agent would:

```python
result = sub.execute_tool("remove_proxies", {...}, wallet)
```

## On-chain implementation [#on-chain-implementation]

`Proxy.remove_proxies` — [`pallets/proxy/src/lib.rs#L306`](/code/pallets/proxy/src/lib.rs#L304-L310):

```rust
#[pallet::call_index(3)]
#[pallet::weight(T::WeightInfo::remove_proxies(T::MaxProxies::get()))]
pub fn remove_proxies(origin: OriginFor<T>) -> DispatchResult {
    let who = ensure_signed(origin)?;
    Self::remove_all_proxy_delegates(&who);
    Ok(())
}
```

Delegates to [`remove_all_proxy_delegates`](/code/pallets/proxy/src/lib.rs#L1143).

Every file is browsable under [/code](/code) exactly as built into the runtime, or as plain text under `/code/raw/<path>` (index: [`/code/index.json`](/code/index.json)).
