---
id: removesubscription
title: "removeSubscription()"
slug: removesubscription
custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml
---
import Tabs from '@theme/Tabs';
import TabsPanel from '@theme/TabsPanel';
Removes an active subscription and returns the number of open connections.
```js
supabase.removeSubscription(mySubscription)
```
## Parameters
## Notes
- Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.
## Examples
### Remove a subscription
```js
supabase.removeSubscription(mySubscription)
```