# removeListener()

[**EIP-1193 events**](https://eips.ethereum.org/EIPS/eip-1193#events)

Removes the listener function as callback of the selected RPC event.

{% hint style="warning" %}
**Warning**

This method will always return, even if there are errors while removing the listener, for controlling errors generated during the deregistration process use [async removeListenerAsync(eventName, listener)](https://docs.constellationnetwork.io/stargazer-wallet/chain-provider-api/async-removelistenerasync).
{% endhint %}

**Type**

`removeListener(eventName, listener): void`

**Parameters**

| Name      | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| eventName | `String`  | Event listened. Depeding on the provider chain one of [Constellation RPC event](https://2892156949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAUvaNviXuvMQPGFFlTu0%2Fuploads%2FlwMsSc6JGh3Hs9uhTPhW%2FconstellationRPCAPI?alt=media) or an [Ethereum RPC event](https://2892156949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAUvaNviXuvMQPGFFlTu0%2Fuploads%2FMUnqupiDBooRpr30wRuc%2FethereumRPCAPI?alt=media). |
| listener  | `()=>any` | Callback function.                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

**Return Type**

`void`

**Example**

TypeScript

```typescript
provider.removeListener("accountsChanged", listener);
```
