How do I delete a database from Firebase?
Solution 1
THIS DELETES THE ENTIRE PROJECT
To delete ONLY the database just delete the top level object/node.
Click on your project (the white box below, hiding name):
Then click on gear (settings) icon and click "Project Settings":
Scroll to bottom and click "DELETE PROJECT":
Solution 2
Another way if you don't want to delete the project, and just the database, is to create a file on your computer empty.json
like this:
{}
Then click on the ...
and "Import JSON"
Then "Browse" and upload your empty file:
You overwrite your database with an empty JSON file, effectively "deleting" the old database.
Solution 3
It's currently not possible to delete other Realtime Database instances created via Firebase Console.
They do have plans for adding the feature,but It'll come in the future. For now, you can watch their updates here:
Their support suggested me to wipe all data and to lock down the database to prevent any usage, as a work-around for now.
Just remembering that having multiple instance is only possible if you have a Blaze account.
Solution 4
Looks like Google recently introduced this feature to delete a Firebase RTDB. To delete this (after we raised this concern with Google Firebase team on Firebase RoadShow India š).
To do this, follow these steps:
- Go to your Firebase RTDB which you want to delete
- Delete all your data from the database
- Select the 3 dots on the top right corner
Hit the "Disable Database" button
After the database is disabled, hit that 3 dots again and click "Delete Database"
Cheers!
Solution 5
If the dots method doesn't work then here's another option-
-
Open the project you want to delete.
-
Go to setting (on the left side of the page|near Project Overview).
-
Select project settings.
-
You'll find delete project option at the end of that page (below app config).
-
Then you'll be asked things about the policy of deleting the project and your preference and stuff... you can answer accordingly.
Edward Potter
Updated on October 28, 2020Comments
-
Edward Potter over 3 years
This must be staring me in the face, but don't see the command. How do I delete an unused Firebase DB from the Console in the new Firebase? And Google did not help with an answer, which is kind of a first.
-
philshem about 6 yearsthis deletes the entire project, but not an individual RTDB
-
philshem about 6 yearsthis still displays the RTDB in the DB list, with a name that can't be changed
-
Mike S. about 6 yearsIt's not clear what you mean @philshem . If you want to completely delete the RTDB, you delete your Firebase project (accepted answer). My answer provides an alternate solution for reader's convenience. By importing an empty object, you are not deleting the database itself, you are just setting it's value to null (empty dictionary or map). You can "import" an empty JSON object from any node in the tree and it's children will all be wiped out.
-
Mike S. about 6 years@philshem as noted in your comment on my answer, a project contains only 1 instance of RTDB. If you want to completely wipe it out, you must delete the project. If you simply want to empty its contents, follow my answer example below and "Import" a file with an empty JSON object
{}
-
philshem about 6 yearsI have one project with multiple RTDBs. I'd like to remove one of the RTDB, or at least hide it from view (to avoid confusing because of poor naming)
-
AdamHurwitz about 6 yearsIncredible! It's mind blowing this feature is not in the UI. In my limited research I've seen some very complicated solutions, this took 30 seconds. Thank you.
-
Nuri YILMAZ over 4 yearssecond step "Delete all your data from the database" imposible for huge data.
-
Shashank Agrawal over 4 yearsWhat do you mean by impossible? Is Firebase not allowing you to delete it?
-
Nuri YILMAZ over 4 yearsyes if you have few entity but subject is huge data. there is no drop table as other RDBMS.
-
GGizmos over 4 yearsI deleted all my data and disabled the database, but I don't get the "delete database" option on the drop down as you show in the picture just above. I decided to use Firestore instad and I just want to get rid of the real time database to avoid confusion, but still doesn't seem to be possible.
-
Shashank Agrawal over 4 yearsAre you the owner or do you have sufficient permission?
-
GGizmos over 4 yearsYes Iām the owner
-
Santhosh John about 3 yearsAs of today, this solution is NOT working. I think Google has removed the
Delete Database
option and it needs to delete the project altogether and create a new one or buy their pro plan(s); which is pathetic for learners.š -
Shashank Agrawal about 3 yearsI just checked. It's there. You need to first disable it and then you will get option to delete it.
-
monsto almost 3 years@ShashankAgrawal the interface is significantly different than your screens above. After deleting the only collection, and disabling the DB via the 3dot menu, the only thing that now shows in the 3dot menu is "Create new database". Are you looking elsewhere to delete the DB? I also am experimenting with Firebase and trying to figure things out, but can operate on RTDB no further because of this "you must now buy it" meme.
-
Alec Gerona over 2 yearsThis should be the accepted answer. Easy and fast.
-
eozzy over 2 yearsThis works in 2022 but only for non-default databases. Default database cannot be deleted nor can its location be changed which is so disappointing