Skip to main content
Version: v1-dev

removeAllChannels()

Unsubscribes and removes all Realtime channels from Realtime client.

final statuses = await supabase.removeAllChannels();

Notes

  • Removing channels is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed.

Examples

Remove all channels

final statuses = await supabase.removeAllChannels();