How do I delete a database from Firebase?

36,882

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):

project

Then click on gear (settings) icon and click "Project Settings":

settings

Scroll to bottom and click "DELETE PROJECT":

delete

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" Import JSON

Then "Browse" and upload your empty file: enter image description here

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:

  1. Go to your Firebase RTDB which you want to delete
  2. Delete all your data from the database
  3. Select the 3 dots on the top right corner

enter image description here

  1. Hit the "Disable Database" button

  2. After the database is disabled, hit that 3 dots again and click "Delete Database"

enter image description here

Cheers!

Solution 5

If the dots method doesn't work then here's another option-

  1. Open the project you want to delete.

  2. Go to setting (on the left side of the page|near Project Overview).

  3. Select project settings.

  4. You'll find delete project option at the end of that page (below app config).

  5. Then you'll be asked things about the policy of deleting the project and your preference and stuff... you can answer accordingly.

Share:
36,882
Edward Potter
Author by

Edward Potter

Updated on October 28, 2020

Comments

  • Edward Potter
    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
    philshem about 6 years
    this deletes the entire project, but not an individual RTDB
  • philshem
    philshem about 6 years
    this still displays the RTDB in the DB list, with a name that can't be changed
  • Mike S.
    Mike S. about 6 years
    It'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.
    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
    philshem about 6 years
    I 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
    AdamHurwitz about 6 years
    Incredible! 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
    Nuri YILMAZ over 4 years
    second step "Delete all your data from the database" imposible for huge data.
  • Shashank Agrawal
    Shashank Agrawal over 4 years
    What do you mean by impossible? Is Firebase not allowing you to delete it?
  • Nuri YILMAZ
    Nuri YILMAZ over 4 years
    yes if you have few entity but subject is huge data. there is no drop table as other RDBMS.
  • GGizmos
    GGizmos over 4 years
    I 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
    Shashank Agrawal over 4 years
    Are you the owner or do you have sufficient permission?
  • GGizmos
    GGizmos over 4 years
    Yes Iā€™m the owner
  • Santhosh John
    Santhosh John about 3 years
    As 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
    Shashank Agrawal about 3 years
    I just checked. It's there. You need to first disable it and then you will get option to delete it.
  • monsto
    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
    Alec Gerona over 2 years
    This should be the accepted answer. Easy and fast.
  • eozzy
    eozzy over 2 years
    This works in 2022 but only for non-default databases. Default database cannot be deleted nor can its location be changed which is so disappointing