How to remove all data from a Firebase database?

BG BRUNO picture BG BRUNO · Feb 12, 2017 · Viewed 20.1k times · Source

I started using a code that using Firebase realtime database. I implemented it to my solution. Connection and control was perfect, so I used it for the production environment.

After a while I was doing upgrade and I need remove all data again - but wait, there are no delete buttons in console anymore at highest root level and only allowed in one selected item at once:

https://console.firebase.google.com/project/{{project_name}}/database/data

In last update shown only this message and no steps what next:

Read-only & non-realtime mode activated to improve browser performance Select a key with fewer records to edit or view in realtime

Q how can I remove all data at once?

Answer

Andrew Roberts picture Andrew Roberts · Sep 19, 2017

You can manually create a JSON file that contains a single empty entry and import it, which will remove all existing entries.