Edward Potter
Edward Potter

Reputation: 3820

How do I delete a database from Firebase?

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.

Upvotes: 37

Views: 55925

Answers (6)

Nik
Nik

Reputation: 9431

Currently its only possible to delete a database from gcloud CLI

First, install gcloud

Get the list of available databases:

gcloud alpha firestore databases list

Update:

note:

You cannot reuse a database ID until 5 minutes after the delete happens.

Then delete:

gcloud alpha firestore databases delete --database="(default)" # or use another id here

Note:

You cannot reuse a database ID until 5 minutes after the delete happens.

Upvotes: 0

samaesha
samaesha

Reputation: 9

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.

Upvotes: 0

Shashank Agrawal
Shashank Agrawal

Reputation: 25797

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!

Upvotes: 7

theblindprophet
theblindprophet

Reputation: 7927

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

Upvotes: 20

Bruno Agostini
Bruno Agostini

Reputation: 121

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.

Upvotes: 12

Mike S.
Mike S.

Reputation: 4879

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.

Upvotes: 32

Related Questions